home *** CD-ROM | disk | FTP | other *** search
/ Aminet 43 / Aminet 43 (2001)(GTI - Schatztruhe)[!][Jun 2001].iso / Aminet / game / board / ChaosLite.lha / Chaos / History.txt < prev    next >
Text File  |  2001-02-23  |  730KB  |  16,270 lines

  1. Massive Changes made by James Conwell.
  2.  
  3. Begin Version 1.6  Jan. 6th 1997
  4. *Enhanced Pronuciation of Speech.
  5. *Made numerous enhancements to program documentation.
  6. *Made numerous enhancements to the User Manual.
  7.  
  8. My dad told me that he was playing a game of Chaos 1.5 and he had a magic
  9. bow with Range Boost.  Everything was great.  He then got _another_ magic
  10. bow so he thought "Oh cool!  Now I can be even more powerful!"  He cast
  11. magic bow and it removed his Range Boost!  He was not happy.
  12.  
  13. One thing that has always annoyed me is not knowing if I have line of sight
  14. diagonally adjacent to a generator or wall.  I hate it when I try to cast a
  15. creature into a blank spot by a generator and then it says I can't because
  16. I don't have line of sight!  Sometimes it works, sometimes it doesn't.  It
  17. all depends on the quadrant.
  18.  
  19. I have decided to alleviate this and add a new capability at the same time.
  20. Spells now have a CAST_LOS bit.
  21.  
  22. Here is a complete list of things that I have changed in the cast.tex so
  23. far:
  24.  
  25. *1. Added a new bit to CastInfo[]  called CAST_LOS.  This bit determines if
  26.     a spell needs Line Of Sight or not.  This solves the problem of casting
  27.     creatures diagonally next to a generator or other large square object.
  28.  
  29.     It also allows the creation of spells that, for instance, have a range
  30.     3 but DON'T require line of sight.  Cool!
  31.  
  32. *2. I have modified the spell bits appropriately.  Now all spells have thier
  33.     CAST_LOS bit set except for spells with range of 0,1 or 15.  So everything
  34.     is functionally the same as it was.
  35.  
  36. *3. CastInfo[] is now an array of UWORDS instead of UBYTES.
  37.  
  38. *4. Made 1 change to DoCast and 2 changes to DoComputerCast to make the
  39.     new CAST_LOS bit take effect.
  40.  
  41. *5. Vengeance and Exorcise used to do the {\it exact} same thing.
  42.     So I was going to change Exorcise to only be able to be cast on Undeads
  43.     and bump the strength up to 7 to make up for this but there is no
  44.     CAST_UNDEAD or CAST_UNDEAD_ONLY bit so I just raised the strength of
  45.     Exorcise to 4.
  46.  
  47.     I just don't see the point in having 2 spells which do the exact same
  48.     thing.
  49.  
  50.     Dark Power and Justice used to do the exact same thing.  Now I have
  51.     changed Justice to be 2 sets of 3-point attacks instead of 3 sets of
  52.     2-point attacks to add some variety.
  53.  
  54.     Thus Justice is now a bit less useful but Exorcise is a bit more useful
  55.     so hopefully the play-balance is roughly the same as it was.
  56.  
  57. *6. Magic Bow is now cumulative.  Since magic bows are so rare (I've never
  58.     had 2 of them in Chaos 1.5), I have set it to bump up the range by 1 on
  59.     additional bows.  That should be a pleasant surprise to anyone if they
  60.     ever have 2 of them!
  61.  
  62. *7. Destroy Wall now destroys PowerWalls also.
  63.  
  64. *8. Made some adjustments to the TeX stuff.
  65.  
  66. *9. Show numbers beside bar graphs.
  67.  
  68. More Chaos User Manual Changes:
  69. *I made lots of little corrections.
  70.  
  71. Then I did some embellishments:
  72.  
  73. *1. I completely rewrote the intro.  Hope you don't mind.
  74.     Sorry it took so long but I just kept rereading it and editing it and
  75.     rereading it and editing it... at least 30 times...
  76.  
  77. *2. I embellished the description of the Roper, the combat section and the
  78.     impurities.
  79.  
  80. Subject: Freaky bug detected!
  81.  
  82. I read over prog.tex thinking I was just going to word correct and spell
  83. correct the tex docs.  This I did. They are now much better.
  84.  
  85.  Then I noticed something...
  86.  
  87. #define GAMEROWNTSC        14  /* number of rows in a NTSC game      */
  88. #define GAMEROWPAL         11  /* the number of rows in a PAL game   */
  89.  
  90. These 2 numbers are switched around!
  91.  
  92. PAL is higher resolution than NTSC, thus it has more rows.
  93. PAL lores = 320x256.   NTSC lores = 320x200.
  94.  
  95. I couldn't believe that the game could even work with these 2 numbers switched
  96. around so I did some more research and found out why it was working...
  97. Another bug!
  98.  
  99. Look at this from cmove.tex
  100.  
  101. int weights[GAMEROWNTSC * GAMECOL];
  102.  
  103. See, it is using what is supposed to be the small value which would be too
  104. small for PAL users which would mean you would be using out-of-bounds
  105. subscripts in PAL mode BUT since you are the luckiest programmer I've ever
  106. seen, these 2 bugs cancelled each other out!  Unbelievable!  When *I* have
  107. 2 bugs in a program they produce 4 errors, not 0.
  108.  
  109. I fixed the stuff in prog.tex and cmove.tex
  110.  
  111. Also in cmove.tex:
  112. I fixed the deal where Independent Undeads never bothered to shoot.
  113. Word corrected some tex notes.
  114.  
  115.  
  116. I noticed something else that looks highly suspicious in prog.tex:
  117.  
  118. #define NTSCMode   (GfxBase->DisplayFlags & PAL)
  119.  
  120. Shouldn't this be                           NTSC ?
  121.  
  122. Yes.
  123.  
  124. I will soon be adding a bunch of new stuff to the game and I don't want to
  125. be accused of being a memory hog so I have made 2 changes in prog.tex to
  126. save about 3k of ram.  I changed
  127.  
  128. const char creature_name[][CREATURE_SIZE] = {
  129.  
  130. to
  131.  
  132. const char *creature_name[] = {
  133.  
  134. to produce a ragged array instead of a memory wasting rectangular array.
  135.  
  136. Ditto for creature_speech.
  137.  
  138. This has saved several k of ram!
  139.  
  140. This also allowed me to delete the #define CREATURE_SIZE and SPEECH_SIZE
  141. since no part of the program ever uses either one.
  142.  
  143.  
  144. move.tex
  145. On a completely seperate subject, I made a small change to move.tex to
  146. allow me to see the _actual_ movement points available.  Sometimes if you
  147. have 2 movement points, you can move diagaonally and then straight.  Other
  148. times you can move diagonally once and then your move is over.  I am hoping
  149. that I can understand the movement system better with the real movement
  150. points showing.  I already understand it better now that I know that you
  151. are given a free .5 points at the beginning of the turn.  That helps a lot,
  152. but I still don't get some things.
  153.  
  154. *Added some prototypes to eliminate warnings with SASC6.0
  155. *Show LOS required on Spell Info screen.
  156.  
  157. Regarding using bitfields vs. NOT using bitfields:
  158. Well, here is everything I know about the subject:
  159.  
  160. accessing board[i].char_stat.Life  as a field of 5 bits vs. as a byte.
  161.  
  162. I will ignore the C overhead since I don't know precisely what that is.
  163.  
  164. At some point a move instruction will be generated to get the value then
  165. an and instruction will have to done to mask the appropriate bits.  Given
  166. the notorious inefficiency of C, probably wastes an instruction fetching
  167. the mask, but who knows.
  168.  
  169. bitfield method:
  170. move.b    source, d0
  171. move.b    mask,d1
  172. and.b    d1,d0
  173. lsr.b    #x,d0
  174.  
  175. Byte method:
  176. move.b source,d0
  177.  
  178. So here we have 4 instructions to fetch the value vs. 1 instruction.  Even
  179. if C is perfectly efficient, it WILL take at least twice as many instructions
  180. to fetch a bitfield as opposed to a byte.
  181.  
  182.  
  183. As for board[i].char_stat.Life vs. board[i].Life I would guess that the
  184. shorter version is quicker but the compiler could be clever enough that it
  185. wouldn't matter.  I am assuming that both are bytes or both are bitfields.
  186.  
  187. The reason bitfields are inherently slow is that all processors that I have
  188. ever studied are all designed to handle data in bytes, and/or words and/or
  189. longwords.  Most processors have no bitfield instructions.  Most of the
  190. processors that do have bitfield instructions (such 68020 to 68060) the
  191. bitfield instructions are much slower than a simple byte instruction (about
  192. 4x slower)  It is often faster to avoid the bitfield instruction and just
  193. use a byte instruction and an and/or instruction.
  194.  
  195. If you are really worried about speed then there is one simple thing you
  196. can do in the future to speed things up.  Avoid >>  and <<.  Shifting a
  197. variable takes an extra instruction.  So shifting and storing takes twice
  198. as long as just storing.
  199.  
  200. However, it is even worse on the 68000.  On the 68000 a shift of 1 takes as
  201. long as a regular instruction but it takes another 2 cycles for each
  202. additional shift.  So when you shift by 3  (  << 3 ) you are adding around
  203. the equivalent of 2 simple instructions to the overall execution time in
  204. assembly code.  Quite possibly more in C.
  205.  
  206. The 68020 and higher processors have a "barrell shifter" which means they
  207. can shift any number of bits left or right in the same amount of time as a
  208. shift of 1.
  209.  
  210. The only time I've really noticed chaos being slow is during computer
  211. movement on my Dad's 7.15909 Mhz A500.  I noticed a lot of math being done
  212. in cmove.tex so that probably explains it.  Multiplies take about 70 cycles
  213. and divides take about 158 cycles on the 68000.  That's like 20 regular
  214. instructions.
  215.  
  216. It basically seems ok to me on my A3000 and back when I used to play it on
  217. the A4000 it flew.
  218.  
  219. Oh yes, I forgot one thing:
  220.  
  221. Every time you access a bitfield it _must_ take at least TWO extra
  222. instructions to do that.  Each instruction is 2 bytes.  So if you have lots
  223. of code that accesses bitpacked fields then much or even all or even worse
  224. than all the space saved is wasted again.
  225.  
  226. So right now every time we access char_stat.Life, there are  2 extra
  227. instructions being generated (at least).  So if we access char_stat.Life 100
  228. times in the program then that wastes 400 bytes and we only saved 3 bits
  229. per item in creature info.  So if we have 200 objects (there aren't that
  230. many yet but there will be one day) then we saved 200*3 bits = 600 bits =
  231. about 75 bytes. A net defecit of 325 bytes.
  232.  
  233. And it takes significantly more time; executing 3 instructions instead of
  234. 1.
  235.  
  236.  
  237. Chaos is currently 190284 bytes in size.
  238.  
  239. To prove that I know what I am talking about, I will now change
  240. CreatureInfo to use all BYTES and then do a complete recompile.
  241.  
  242.  <Time Passes>
  243.  
  244.  ...
  245.  
  246.  <More Time Passes>
  247.  
  248. Ok the complete recompile is done.
  249.  
  250. Chaos is now only 187452 bytes in size!  Cool, I just saved you another
  251. 2,832 bytes.  Maximum code size was reduced by about the same amount.
  252.  
  253. The game is now faster too.  Our fathers should appreciate that. 8)
  254.  
  255. This is good because I'm fixing to add in about 5k of new
  256. variables to the program.  Heehee.
  257.  
  258.  
  259. James "The Optimizer" Strikes Again!
  260.  
  261.  
  262.  
  263. SAI changes: =========================
  264. *20 new spells!!!.
  265. *CAST_UNDEAD_FLAG
  266. *Other stuff.
  267. *Fixed a bug that sometimes causes a crash. (obtain/release semaphore)
  268. *Added some prototypes to eliminate warnings with SASC6.0
  269. ======================================
  270.  
  271. More JJC Changes
  272. Begin Version 1.7  Feb 16th, 1997.
  273. *Resurrect and RessurrectID   -> MassResurrect
  274. *Cloaked creatures now block enemy's LOS but not friendly's LOS.
  275. *No need to specially program things that don't block LOS (like Pool and
  276.  Fire).  The Chaos Engine now takes care of that for you when you set the
  277.  Blocks_LOS entry in CreatureInfo appropriately.
  278. *Added new function SameTeam to predicate.tex to assist with new LOS code.
  279. *Pick your bonus spells. I'll do the GUI later.
  280. *Fixed life 0.  Creatures didn't die when they reached 0 life.  Now they do.
  281. *Fixed Load last name from savefile.
  282. *Added lots of new stats in and set them appropriately for each creature.
  283. *Movement points as float rather than integer.
  284. *Personalities (I put in the new stats in CreatureInfo but cmove.tex still
  285.  must be changed.
  286. *Modified end-of-turn healing to heal all appropriate stats.
  287. *Modified existing combat routine to take into account negative combat.
  288.  We can now make creatures whose attacks heal instead of hurt.
  289. *Modified existing combat routine to take into account affecting
  290.  different/multiple stats other than life.
  291.  Now we can make creatures that attack any stat or combination of stats.
  292.  Such as intelligence or magic resistance etc.
  293. *Added 1 new paragraph to the docs.
  294. *Put in SpecialCombatHandler Routine which replaces WaspNestHandler
  295. *Roper, Wasp Nest, Pool, Volcano, Apple Tree are now ordinary items which
  296.  have SpecialCombat.
  297. *New predicate isSomethingThere(cell)
  298. *Modified RangedCombat routine to take into account CR_LOS.  Now we can
  299.  make creatures which have distance weapons that don't require line of
  300.  sight.
  301. *Added new predicates: AttacksLiving, AttacksUndead, isUndead
  302. *Modified maiming routine to not maim on negative combat.
  303. *Fixed Predicate.tex with modified predicates to use the new char_stat.Stat
  304.  method.
  305. *Completely absorbed SpecialFlags into char_stat.Stat.
  306. *We can now have creatures that gain or lose flying ability.
  307. *UNDEADFLAG has now been translocated into char_stat.Stat with UNDEAD_STAT
  308. * A. Lich and Lich Lord and Raise Dead have been modified appropriately.
  309. * B. search/replace all UNDEADFLAG, #define UNDEADFLAG. Done.
  310.   C. Decide what to do about slime covering you over. I guess just have
  311.      oldchar_stat
  312. * C. There was a bug with Magic Sword and Magic Knife:  If the wizard
  313.      already had MAX_COMBAT and then cast Magic Sword or Magic Knife then
  314.      he did NOT gain the abiltiy to attack undeads because the sword/knife
  315.      did not get applied.  This is now fixed.  The routine is now much
  316.      shorter also.
  317. * D. Magic Sword and Magic Bow and Magic Knife now set the appropriate
  318.      bit in board[cell].char_stat.Stat 
  319. * We can now make creatures which cannot attack living creatures, only
  320.   undeads.
  321. * We can now make creatures whose specialcombat affects very specific
  322.   groups of creatures and any combination of stats.
  323.  
  324. * Info Screen graphing is now even better!
  325.  
  326. *I have Considered making Stat an int to eliminate many warnings
  327.  but I have decided that it would be much better to just change the
  328.  functions that generate the warnings into macros.  This results in a
  329.  faster game.  A small macro should be slightly smaller than a function call.
  330.  The macro saves 4 bytes by not using bsr/rts and I guess it saves about 8
  331.  more bytes because of not pushing and pulling the parameters on/from the
  332.  stack like a function does. But it should use more bytes by having in-line
  333.  code.  All in all it should save a few bytes per macro, as long as the
  334.  macros are simple 1-line commands.
  335.  
  336.  I am certain that macros are faster.
  337.  
  338. * Experiment:  Change the following functions into macros and recompile to
  339.   measure the code size difference: 
  340.   isStatic, isMount, isDragon, isGrowth, isInanimate and isMeditation.
  341.   isFlying could be converted to a macro but that would require that
  342.   WizardWings set the flying bit on the wizard rather than setting the
  343.   .Wings bit in the wizard structure.  Why not have WizardWings simply set
  344.   both bits for now?
  345.  
  346.   Chaos is currently 194476 bytes.
  347.  
  348.   Recompiling...
  349.  
  350.   Chaos is now       194028 bytes.  I saved us another 448 bytes!  And that
  351.                                     is just for now.  The more we use the 
  352.                                     macros in the future, the more we save!
  353.                                     The game is now somewhat faster.
  354.  
  355. *ShadowForm, .Shadow, ShadowFormID -> Irvine's_Invulnerability
  356. *Heal and HealID -> Restoration.
  357. *Modifified Sencode.c so we can now have spellnames with ' in them.
  358.  
  359.  
  360.  
  361. * info screen has now been revamped to show all the new stats in a graphical
  362.   manner.
  363.  
  364. *DELETE UNDEADFLAG AND isLivingAttackingUndead from the program forever!
  365. *Edited the tex in spell.tex
  366.  
  367.  
  368.  
  369.  
  370. Begin version 1.7.2:
  371. *Replaced all occurences of board[cell].??? & CLOAKEDMASK with isCloaked
  372.  macro. (except 1)
  373. *Translated all the code so the Cloaked Stat now resides in char_stat.Stat
  374.  
  375. * Replaced all ((board[i].flag & ANIM_STATE_MASK) != DEAD) with
  376.                 (!isDead(i)) macro
  377. * Translated all the code so that Dead Stat now resides in char_stat.Stat
  378.  
  379. *Sleeping Creatures now stop being animated so you can see that they are
  380.  asleep.
  381.  
  382. C SUX!  C SUX!  I just wasted the last hour trying to figure out why the
  383. hell this program wouldn't compile.  It turned out that it WASN'T doing
  384. predicate.tex even though I had saved it TWICE and reloaded it to make sure
  385. that everything was there.  It just ignored my changes and kept using an
  386. old version that was somehow missing a ).
  387.  
  388. Transfer over the other flags like cloaked, dead, asleep, static.
  389.  
  390. I was going to transfer over asleep and static but static should never
  391. change so hopefully I can ignore that.  That leaves asleep... I'm not sure
  392. if I should have asleep in both cell.flag and char_stat.Stat for now or
  393. what. 1st I will simply replace all: 
  394.    ((board[i].flag & PLAYER_MASK) >> 3 != ASLEEP) )
  395. with !(isAsleep(i)) to make things easier to read, etc.
  396.  
  397. I was really cautious with transferring over ASLEEP.  Perhaps when I know
  398. the program better I will make things more elegant and simple.
  399.  
  400. * Translating dead and cloaked into char_stat.Stat is turning out to be a
  401.   real bitch.  Probably something will be messed up somewhere.
  402.   Hmmm.. Everything seems to be working perfectly except for the fact that
  403.   Computer controlled shooters keep shooting dead bodies.  Perhaps I forgot
  404.   a ! somewhere?  Hmmm... the computer controlled shooting looks ok and so
  405.   does the macro.  Strange.  I don't know what is wrong.
  406.   Cloaking isn't working. 2 point attacks damage.  Cloak graphic not drawn
  407.   on screen.  Ok I think I fixed everything.  Dead, cloaked, asleep, static
  408.   will reside in both board[cell].flag for the animator and
  409.   board[cell].char_stat.Stat for everything else.
  410.  
  411.  
  412. Part of the reason I want to have dead and asleep in char_stat.Stat is so
  413. that we can eventually have sleeping and dead creatures that belong to
  414. someone.  That would allow us to make more wierd spells that only affect
  415. your own or your enemy's dead creatures, etc.
  416.  
  417. * I spent all day reading the SASC manual about smake and codeprobe.
  418. * Enhanced the smakefile
  419. * Used codeprobe to figure out that screwey bug with dead creatures.  Now
  420.   everything works perfectly!
  421.  
  422. Weird bug with simulacrumming a wizard.
  423. I was controlling 2 different wizards who were not in an alliance with each
  424. other. I had Double in effect.  I double simulacrummed the other wizard.
  425. I simulacrummed the original and then I simulacrummed the copy.
  426.  
  427. I hopped one of the wizards on a unicorn and it just disappeared. It wasn't
  428. there and it couldn't dismount. Ever. The unicorn was still there but not
  429. the wizard.
  430.  
  431.  
  432. The following 3 things were psychologically torturing me:
  433. *1. WriteBottom always wrote text off the bottom of the screen
  434. *2. All the -1's for accessing the Team[] array
  435.  3. All the -1's for accessing the wizards[] array
  436.  
  437. Now I will attempt to eliminate all these -1's from the program.  I sure
  438. hope this works because it is very confusing to me, trying to tell which to
  439. use, player or player-1.  1st I will attempt to convert Team[] since there
  440. are only about 19 occurrences of Team[] to convert.
  441.   Chaos is currently 197156 bytes.
  442. Well, that wasn't much fun at all.  I ended up having to add some +1's to
  443. the program due to the way loops and variables were pre setup so it
  444. cancelled out a bunch of the advantage I was trying to get.
  445.   Chaos is now       197136 
  446.  
  447. *Team[] now goes from 0 to 8.  0 is not used but is saved and loaded.
  448.  Now we just check Team[player] instead of Team[player-1]
  449.  
  450. I think I will just pass on the wizards array, though I really wish it was
  451. based on 1 to 8 to match the wizard #. Too much of a chance of me
  452. introducing a new bug that I can't fix.
  453.  
  454. *Modified the following creatures to take advantage of the new combat system
  455. *1. Cobra is now poisonous.
  456. *2. Halfling is now _very_ magic resistant.
  457. *3. Mind Flayer now really attacks intelligence.
  458.  
  459. *Creature Recovery now handles negative recovery rates (Poison), though it
  460.  won't actually kill you yet.
  461.  
  462. *Fixed description of Justice spell.
  463.  
  464. *Numeric keys show player's creatures in RED1 if they have moved and in
  465.  WHITE if they haven't moved.
  466.  
  467. My upgrade was going along just fine until I tried to move the dead bit
  468. into char_stat.stat.  Now I actually made bugs.  Hopefully they are all
  469. fixed now.
  470.  
  471. * Fixed Lich spell description.
  472. * Pool is now a regular spell.  In my opinion it is hard enough to use due
  473.   to Eagles and things that fly up at it and also because it adds the
  474.   "Repair your forces" play mechanic to the game.
  475.  
  476. BUG: LoadGame no longer works.
  477.  
  478.  
  479. Begin 1.7.3
  480. *Made 2nd info screen to show all stats such as CR_LOS, Attacks_Undead,
  481.  Favorite Food, Afraid of,  etc.
  482.  This is something that I've been wanting for a very long time!  Now I can
  483.  see EVERYTHING about a creature.
  484.  
  485. *Made 2nd SpellInfo screen with all casting attributes. This is something
  486.  that I have _REALLY_ been wanting for a long time!  I am always casting a
  487.  spell and then I find out that I can't cast it where I want to so I have
  488.  to abort it!  I have 3 times tried to cast armour on a Violet Fungi during
  489.  an important game and it wouldn't let me.
  490.  
  491. *Give the archers actual archery skill. Reduce their range to keep the same
  492.  play balance as before.
  493.  
  494. *Give the archers 1 point of Magic Resistance recovery since their
  495.  description says they have a pure heart and have high magic resistance
  496.  
  497. *Removed archery skill from inanimates and growths.
  498.  
  499. Replace GetCell(x,y) with an array.
  500. Make Getx(cell) Gety(Cell) with an array to replace all that division and stuff.
  501.  
  502. Would GetCell really be faster?  Hmmm... I suppose not.
  503. Would Getx(cell) and Gety(cell) be faster?
  504. I think so.  Since now each one uses a division instruction but accessing
  505. a 1-dimensional array requires no multiplication or division, just 1
  506. addition to add the subscript to the base. This will be MUCH faster on the
  507. A500.  Unfortunately, I have just looked around through the code and it
  508. doesn't seem that it gets used all that much.  I'll have to use an int to
  509. prevent warnings so the question is will it be worth the 1k of ram that it
  510. will use?
  511.  
  512.  
  513. *Earthquake movescreen effect.
  514. * Horziontal_Shake
  515. * Vertical_Shake
  516. * Diagonal_Shake
  517.  
  518. *Changed Move.tex so that elementals, generators, Stone Giants
  519.  and StoneGolems and EarthQuakes shake the screen when they die.
  520.  
  521. *When an EarthQuake grows, the screen shakes.
  522.  
  523. *Speeded up screen scrolling in start.tex.  At first this made it smoother
  524.  but now it is yucky.  It is rather random.
  525.  
  526. Show team on info screen. Need Sean to redo near/far hunks or something.
  527. Show corpse (if any) on info screen somewhere.
  528. *Fixed bug with identification of bonus spells on spellinfo. Another one of
  529.  those -1 things threw me off.
  530.  
  531. *Show Powerups like combat, recoverboost and speed on info screen.  I've been
  532.  wanting this feature for a long time!  I am always having 3 creatures that
  533.  look alike EXCEPT for that 1 of them has Combat.  And then I have to click
  534.  on each 1 of them and look down at the combat stat to find which one it is.
  535.  Now the little Combat symbol is up there as a powerup so it is easier to
  536.  spot.  Looks cool too.
  537.  
  538. *Eliminated Plastic looking borders on info screens.  Now looks more
  539.  slick!
  540.  
  541. * CR_LOS is now more sensibly known as Archery in the program.
  542.  
  543.  Some sort of bug with scrolling credits.  After 20 minutes or so the
  544.  machine locks up.
  545.  
  546.  
  547. * Changed it so that creatures without ranged combat no longer have a
  548.   CombatApply mask on life for ranged combat.
  549.  
  550. * Adjusted Magic Bow and Magic Wings so they would work 100% with the new
  551.   system. 
  552.  
  553.  
  554.  
  555. Begin 1.7.4
  556.  
  557. *Set ATTACKSLIVING_STAT and ATTACKSUNDEAD_STAT for lichlord and
  558.  Magic sword/knife/bow. (move.tex/cast.tex)
  559.  
  560. *"fixed" LichLord, Simulacrum, Replicate, Vortex.
  561.  
  562. * Show allies on number keys. + change the docs.
  563.  
  564. * Allegedly fixed it so a wizard in a castle or tree can attack enemies.
  565.  
  566. * Joe made me put in numeric keypad support.
  567.  
  568. * put in new stat in cast.tex called CAST_GROWTH because the computer just
  569.   cast 6 raise deads on 6 different orange jellies.
  570.  
  571. * Things like walls and pits can now be cast ON growths.
  572.  
  573.  
  574. Begin 1.7.5
  575.  
  576. * Fixed that annoying empty dead cell bug.
  577.  
  578. * Fixed Tempests so they don't distort space.
  579.  
  580. Sometimes the Bonus Spell window ONLY displays Hide spells.  Once this
  581. starts it never seems to stop; every bonus spell for the rest of the game
  582. is displayed as a Hide spell.
  583.  
  584.  
  585. * New method of showing what stats are attacked by combat.
  586.  
  587. * Optimize the highlight routine.
  588. * The highlight routine is tooo slow so I am implementing xpixel[cell] and
  589.   ypixel[cell] which will save 2 divisions and 2 multiplications and 2
  590.   additions per relevant cell.  Highlighting a screen full of creatures,
  591.   growths and allies was just tooo slow.
  592.  
  593. * Purple combat conflicted with pink recovery so I changed Combat to BROWN.
  594.  
  595. * Growth rates were incredibly high so I doubled GCEILING to slow them down
  596.   some.
  597.  
  598. * Fixed the DarkWood so they now attack and while I was at it I changed
  599.   their abilities and description a bit.
  600.  
  601. * RMB now cancels info screens properly.
  602.  
  603. * Shortened ScreenShakes. 
  604.  
  605. * Fixed Touch of God to set CombatApply Combat and Ranged Combat for Life.
  606.  
  607. * Now Info screen shows BrainBoost, MagicShield and Armour powerups.
  608.  
  609. * Team Icon now displayed on Score Screen and TeamScore screen.
  610.  
  611. * Collapsing meditations now give at least 2 spells to pick from.
  612.  
  613. Test 8 human players with 20 spells.
  614.  
  615. Vitality Icon -Speed icon Command Icon.  I vote .5 points for.  Joe votes 1
  616. point against Joe wins.
  617.  
  618. * Team scores are now displayed but they are not sorted correctly.
  619.  
  620. BUG:
  621. Start a game with 8 human players and 20 spells each.
  622. If you cast and discard then everything is ok.  If you don't cast but you
  623. do discard then everything is ok.  But if you cast and then don't discard,
  624. the next player loses a spell (only starts with 19).
  625.  
  626. * Pick your bonus spell even if it is only 1.  This way you _know_ that you
  627.   got a bonus spell and you know exactly what you got as a bonus spell.
  628.  
  629. * The old sound system hogs 2 audio channels.  As a quick fix I just
  630.   commented out the code for 1 of the channels so now it only uses/hogs 1
  631.   channel.
  632.  
  633. ----------- LONG HIATUS ----------
  634.  
  635. Begin vesion 1.8:
  636. * July 1997: Made a teensy weensy correction to the docs.
  637. * Outlined some further ideas on gameplay in English.
  638.  
  639. * fixed some serious problems in the makefile. I had added some new
  640. functions into cell.tex and then called them from prog.tex but the game
  641. wouldn't compile because it kept complaining that there were no prototypes
  642. declared for the functions (but they were declared properly in cell.tex).
  643. The trouble was the makefile was trying to recompile chaos without FIRST
  644. recompiling cell.tex.  cell.o wasn't listed as a dependency.  Now it is.
  645. Same thing with start.o.
  646.  
  647. Presumably just about EVERY file should be listed as a dependency for
  648. Chaos.  And probably MANY files should be dependencies of many other
  649. files...  There must be a JILLION other bugs just waiting to happen in the
  650. makefile.
  651.  
  652.  
  653.  
  654. Ok, now cell gets redone EVERY time I do anything.  I just made one little
  655. change to start.tex and now cell.tex AND start.tex and spell.tex and
  656. cast.tex and info.tex, cmove.tex, move.tex, score.tex, warp.tex are ALL
  657. being recompiled!! 8(
  658.  
  659.  
  660. Ok, I just waited half an hour for my program to compile before I noticed
  661. that tex2c was caught in an infinite loop and was making an infinitely
  662. large sized cell.c file.  (There was no \end{verbatim} at the very end of
  663. cell.tex
  664.  
  665. * Added the following color effects to cell.tex:
  666. * The FadeTo___Scale routines fade the foreground only. The background stays
  667. * black.
  668.  
  669. * FadeToGreyScale (Fade the whole screen to a b&w photograph)
  670. * FadeToRedScale
  671. * FadeToGreenScale
  672. * FadeToBlueScale
  673. * FadeToCyanScale
  674. * FadeToYellowScale
  675. * FadeToMagentaScale
  676. * FadeToColor (Fade the whole screen, including the background, to a SOLID color)
  677. * LowLevelFade (fades to any colorscale)
  678.  
  679. * Added new global variable vp to be the pointer to the viewport of the game.
  680.   I needed this for my asm animator routine.
  681.  
  682. * Replaced all occurences of &(screen->ViewPort) with vp thus saving a few
  683.   bytes and cycles.
  684.  
  685.  
  686. Problem: You click on a creature and then you think about where to move
  687. him.  Where is he most needed?  Which direction should he move?  Should he
  688. attack the weak creature or the strong one?  Who's creature is that over
  689. there anyway?  .... So you highlight the ? mark and you look around at all
  690. the different creatures and one thing leads to another and pretty soon...
  691. You've forgotten which creature you were moving!   I've noticed this
  692. happening on a regular basis with people who are playing a big complicated
  693. game.   Sometimes the phone ringing can cause this same problem.
  694.  
  695. Solution:
  696. * Added animated sprite to highlight the creature whose turn it is.
  697.   Utilizes 50 fps animation so it really catches your eye. I drew a simple
  698.   little 4-frame animated sprited for this purpose.  Hmmm... 50 fps is
  699.   actually TOO fast (at least for this particular sprite) so I slowed it
  700.   down to 25 fps.
  701.  
  702. * Successfully linked an asm routine to the C main program and shared
  703.   variables between C and asm.  Gee, it only took me 20 hours of mortal
  704.   combat with the Slinker to achieve this...  I eventually just set
  705.   data=far for EVERY module to get it to work right.  I'll fix it to
  706.   use near data later.
  707.  
  708. * Modified the makefile to take into account the new asm files.  BTW: the
  709.   compiling/linking process seems to go quite fast when I just make a little
  710.   change to move.tex or cmove.tex.  The makefile seems to really be doing
  711.   its job now. 8)
  712.  
  713. * Replaced all occurences of 
  714. (cell % GAMECOL) * 16 + 8;  and (cell / GAMECOL) * 16 + 8; and
  715. ((cell % GAMECOL) << 4) + 8 and ((cell / GAMECOL) << 4) + 8) WITH:
  716. xpixel[cell]                and ypixel[cell]
  717.  
  718. * Many small fixes to TeXnotes.
  719.  
  720.  
  721. BTW: My brain had begun thinking in C and I had planned to simply make my
  722. sprite-highlighter routine and my animator routine in carefully coded C.  I
  723. decided I'd do it in C and then MAYBE way later on convert the whole thing
  724. to asm.  So I wrote up my sprite-animator in C and then it wouldn't compile
  725. my 0b1000000000000001 numbers.  I asked numerous people on the net and they
  726. all said "C can't do binary numbers"  (!)  WTF!?  So I got REALLY mad at
  727. how lame C is because I like to SEE my and/or/xor masks visually in my
  728. program.  In fact I got so mad that I just rewrote the whole thing in asm
  729. and now I'm glad I did.  But don't worry, when we convert to another
  730. computer I can translate all the asm code to C no problemo amigo. 8)
  731. My sprite was in binary numbers because I designed it in Cygnus Ed
  732. Professional as a series of binary numbers.
  733.  
  734. * Animation Upgrade Plan:
  735.  
  736. * Phase I: Shifted the map over to the left edge of the screen so all
  737.   graphic writes are now word aligned.  The Blitter is a 16-bit processor.
  738.   The old system had the blitter doing the following things:
  739.   1) Read Source data of 1 word.
  740.   2) Read *2* destination words. (since they were unaligned)
  741.   3) Shift the source data over and mix it with the destination data and
  742.      then write out the *2* destination words.
  743.   That is a total of 5 Bus accesses!
  744.  
  745.   Now that I have word aligned everything the blitter just does:
  746.   1) Read Source data of 1 word.
  747.   2) Write destination data of 1 word.
  748.   Only 2 bus accesses!!  So the blitter operations are now more than 2.5x
  749.   as fast!  Unfortunately after factoring in CPU overhead it may work out
  750.   to only about 2x as fast.
  751.  
  752.   This was also neccessary for my upcoming assembly animator which will get
  753.   even more speed as a result of the even alignment.
  754.  
  755.   You can still tell where the edge of the map is because the
  756.   mouse pointer stops at the edge.  If that isn't good enough then just
  757.   tell me and I can make a 1-pixel-wide sprite that marks the edge.
  758.   I left you a 1-pixel edge on the top of the map. 8)
  759.  
  760. * Phase II: Static and empty cells are NO LONGER REDRAWN by the animator.
  761.   If it isn't animated then the animator doesn't need to draw it.  So on
  762.   average this doubles the speed of the animator.   In the WORST case it
  763.   will go the same speed as it used to go.  In the BEST case it goes about
  764.   238x faster!  On average it should cruise 2x as fast as before.
  765.  
  766.   In order for phase II to work, all cell effects routines that damage the
  767.   graphics of multiple cells are now modified to set RedrawAll=YES so the
  768.   animator will redraw all objects during the next cycle.  RedrawAll is a
  769.   bit misleading since it doesn't redraw empty cells at this time.
  770.   (Currently the game is so well-behaved that it doesn't need empty cells
  771.   to be redrawn.)
  772.  
  773.   I have implemented much of Phase II at this time but I have to send you
  774.   an update in 36 hours so I am putting it ON HOLD due to the fact that
  775.   updating cast.tex may be troublesome...  I just don't know yet.  This new
  776.   animation philosophy means that when the game modifies the graphics in a
  777.   cell then it should set them back to way they are supposed to be at the
  778.   end of the routine.  Routines cannot depend on the animator to redraw an
  779.   inanimate object.  Some routines in the game are set to work fine with
  780.   this new philosophy, other routines are ???
  781.  
  782. * Doubled the speed of the BoardEffect C code.
  783.  
  784. * Retargetable graphics upgrade: Retargetable graphics are needed so the
  785.   game can inherently work with 16x16 or 32x32 or 32x16 or 16x32 or even
  786.   64x64 cells.  This is needed for a variety of reasons and since my
  787.   xpixel[] and ypixel[] arrays have already done much of the work I may as
  788.   well just make the rest of the changes that are needed to complete this
  789.   new capability:
  790.  
  791. * Replaced all appropriate occurrences of 16 with CellWidth or CellHeight
  792.   and 8 with HalfCellWidth or HalfCellHeight in Cell.tex, move.tex,
  793.   cmove.tex and prog.tex and cast.tex.  I didn't touch info.tex.
  794.   I'll have to do that one when the day comes.
  795.  
  796.   You should look over TELEPORTIN and TELEPORTOUT in Cell.tex because I
  797.   think they need further adjustment to make them handle any size of cell.
  798.  
  799.   In the future don't use the constant 16.  Use CellWidth or CellHeight
  800.   instead.  Don't use 8.  Use HalfCellWidth or HalfCellHeight instead.
  801.   CellWidth, CellHeight, HalfCellWidth and HalfCellHeight are variables and
  802.   not #defined because we may someday have the capability of letting the
  803.   user choose his displaymode and his tilesize at run time.
  804.  
  805. * I talked to an Amiga guy about his favorite strategy games.  (He had no
  806.   idea that I was co-coder of Chaos)  He mentioned Chaos as one of his
  807.   favorite strategy games.  I asked him lots of questions about Chaos like
  808.   what are its good points and what are its bad points and what kind of
  809.   game is it?  And stuff like that. He said a lot of interesting things.
  810.   One of his main complaints was that the computer moved to slowly.  Well,
  811.   I had just been waiting for a real life gamer to complain about the speed
  812.   to justify spending some time looking over cmove.tex.  Now that I've
  813.   looked it over  Here is my report:
  814.  
  815. * Speeded up GetWizardWeight
  816.  
  817. * Speeded up ChooseDestination
  818.  
  819. * I just figured out how to speed up computer movement an additional 4x
  820.   but I doubt that I can get it programmed in before the Sunday Morning
  821.   deadline.
  822.  
  823. * I just spent 10 hours fiddling with slinker settings and recompiling and
  824.   adjusting code and moving data into __far and reading manuals but nothing
  825.   worked!  I could NOT get Chaos back to using near/far data again. So I am
  826.   giving up in frustration and I will try again in a few months when I know
  827.   more.  In the meantime, the makefile is already set to do data=far on
  828.   every module so at least the game works.
  829.  
  830. * I can't think of any reason not to be passing parameters in registers.
  831.   This is faster and takes less memory.  So I will now modifiy the makefile
  832.   to do parameters=register.  This should save us about 3k off the size of
  833.   the executable.  Chaos release is currently 235328 bytes
  834.   <Several hours later>  Geez... it kept giving errors about undefined
  835.   symbols and stuff....  Ok I FINALLY got it all figured out and it is
  836.   compiling properly.  Chaos is now 231892 bytes for a savings of 3436
  837.   bytes!  That works out to about 512 bytes per hour of work....
  838.  
  839. * I've now read the docs about saveds and I understand it now.  I can't
  840.   think of any reason why we need to compile the whole game with saveds.
  841.   Only the Animator Task needs __saveds in its definition (which it has had
  842.   for some time now.)  So I will now remove saveds from the makefile and
  843.   save about another 1k.  IF YOU KNOW OF ANY OTHER FUNCTIONS THAT NEED
  844.   __saveds THEN PLEASE JUST ADD THE __saveds keyword to their definition
  845.   and also tell me about the function so I'll know about it.  Thank you. 8)
  846.  
  847. * Chaos is now only 229696 bytes thus saving 2196 bytes!!!!
  848.  
  849. I assume we can save another 20k once we figure out how to start using near
  850. data again.
  851.  
  852. --------- SUNDAY DEADLINE HERE --- COULD NOT REACH YOU ---------
  853.  
  854. * All this time my HighlightSprite was messed up and nobody ever noticed
  855.   it.  But when I stared at it I noticed that the right hand side was
  856.   messed up somehow.  It turned out that the right side of frame 3 was
  857.   exactly the opposite of how it was supposed to be.  FIXED.
  858.  
  859. * I just found this: ftp.waikato.ac.nz  Maybe we could FTP in the future?
  860.   Then I wouldn't have to do that weird compress or whatever.
  861.  
  862. * I rewrote SqDistance in optimized assembly code.  It is now 11x as fast
  863.   as before.  C version took about 1834 cycles while mine takes only about
  864.   156 cycles.  Cycle times listed are for 68000.  I am hoping this will
  865.   translate into making the computer creatures move 4x as fast because
  866.   SqDistance is in the inner-innerloop and gets executed a LOT.
  867.  
  868. * Ok, I've gone all through cast.tex and made the changes to keep it
  869.   in sync with the new animation system.  CellEffect does not redraw the
  870.   cell at the end so the caller must redraw it if needed. (It usually is
  871.   but not always.)
  872.  
  873. * ReDrawCell now explicity redraws BLANK cells as BLANK cells.  So now it
  874.   will erase any damaged graphics.  It also does its work within an
  875.   Obtain/Release Semaphore pair.
  876.  
  877. * I was wandering through the program, implementing Phase II of the new
  878.   animation system when I found the following messed up code.
  879.   Check it out:  .... 30 minutes later... oops... I thought I'd found a
  880.   major bug.  But it turns out to just be messed up indentation.  I made
  881.   the necessary adjustments.
  882.  
  883. Collapse magic castles, dark citadels and magic woods as appropriate.
  884.  
  885. \begin{verbatim}
  886.     if (((id == MagicCastleID || id == DarkCitadelID) &&
  887.        (MSGRandom() % CASTLE_COLLAPSE) == 1) || (id == MagicWoodID  &&
  888.         GetWizardCode(i) != NOTHING && (MSGRandom() % TREE_COLLAPSE == 1))) {
  889.         int player;
  890.         player = GetWizardCode (i) - 1;
  891.         ObtainSemaphore (&BoardLock);
  892.         board[i].id = NOTHING;
  893.         ReleaseSemaphore (&BoardLock);
  894.         CellEffect (i, EXPLODE);
  895.         ObtainSemaphore (&BoardLock);
  896.         if (player >= 0) {
  897.             board[i].id = wizards[player].id;
  898.             board[i].flag = wizards[player].flag;
  899.             board[i].char_stat = wizards[player].char_stat;}
  900.         else {
  901.             board[i].id = 0;
  902.             board[i].flag = 0;
  903.             board[i].char_stat = InitialData[NOTHING];}
  904.             DrawCell (&NothingImage, i);
  905.             ReleaseSemaphore (&BoardLock);
  906.             board[i].oldid = NOTHING;
  907.             board[i].oldflag = NOTHING;
  908.             board[i].oldchar_stat=InitialData[NOTHING];
  909.             if (isWizard(i)) {
  910.                 sprintf (text_store,"New spell for %s", player_name[player+1]);
  911.                 WriteBottom (rastPort, text_store);
  912.                 AUDIOPlay (1000,10,1,20);
  913.                 wizards[player].BonusSpells += 1;
  914.                 wizards[player].BonusSpellsPick = 2 + MSGRandom() % 3;}
  915.          }
  916.     }
  917. }
  918.  
  919.  
  920. * I have changed the animator to do only _1_ Obtain/Release Semaphore pair
  921.   per update.  This saves 474 jsr/rts combos per frame resulting in a
  922.   significant speed increase in the animator task. 
  923.  
  924.   I traced through ObtainSemaphore and ReleaseSemaphore and counted the
  925.   cycles. All cycle times are from the 68000.
  926.  
  927. ObtainSemaphore Trace:
  928. 12    LEA    07583670,A0
  929. 20    MOVEA.L    0004,A6
  930. 18    JSR    FDCC(A6)
  931. 12    JMP    0XF82E50
  932. 16    ADDQ.B    #1,0127(A6)
  933. 16    ADDQ.W    #1,002C(A0)
  934. 8    BNE.B    0XF82E68
  935. 28    MOVE.L    0114(A6),0028(A0)
  936. 16    ADDQ.W    #1,000E(A0)
  937. 10    BRA.W    0XF82954
  938. 16    SUBQ.B    #1,0127(A6)
  939. 8    BGE.B    0XF82966
  940. 12    TST.B    0126(A6)
  941. 8    BGE.B    0XF82966
  942. 12    TST.W    0124(A6)
  943. 8    BMI.B    0XF82968
  944. 16    RTS
  945. TOTAL:
  946. 236 CYCLES!  *238*3=168504 cycles for a screen full of animated objects at
  947. a VERY low framerate of only 3 fps.
  948.  
  949.  
  950.  
  951. ReleaseSemaphore Trace:
  952. 12    LEA    07583670,A0
  953. 20    MOVEA.L    0004,A6
  954. 18    JSR    FDC6(A6)
  955. 12    JMP    0XF82EA6
  956. 16    ADDQ.B    #1,0127(A6)
  957. 16    SUBQ.W    #1,000E(A0)
  958. 8    BNE.B    0XF82EBE
  959. 20    CLR.L    0028(A0)
  960. 16    SUBQ.W    #1,002C(A0
  961. 8    BGE.B    0XF82EE0
  962.  
  963. 56    MOVEM.L    D0-D1/A0-A3,-(A7)
  964. 4    MOVEA.L    A0,A2
  965. 8    LEA    0010(A2),A0
  966. 12    MOVEA.L    (A0),A1
  967. 12    MOVE.L    (A1),D0
  968. 8    BEQ.B    0XF82F18
  969. 12    MOVE.L    D0,(A0)
  970. 6    EXG    D0,A1
  971. 16    MOVE.L    A0,0004(A1)
  972. 4    MOVEA.L    D0,A1
  973. 16    MOVE.L    0008(A1),D0
  974. 14    BCLR    #0000,D0
  975. 8    BNE.B    0XF82F70
  976. 4    TST.L    D0
  977. 8    BEQ.B    0XF82F20
  978. 4    MOVEA.L    D0,A1
  979. 16    MOVE.L    A1,0028(A2)
  980. 16    ADDQ.W    #1,000E(A2)
  981. 4    MOVEQ    #10,D0
  982. 18    JSR    FEBC(A6) ------------->
  983. 12    JMP    F82826
  984. 8    LEA    001A(A1),A0
  985. 20    MOVE.W    #4000,00DFF09A
  986. 16    ADDQ.B    #1,0126(A6)
  987. 20    MOVE.L    (A0),-(A7)
  988. 20    OR.L    D0,(A0)
  989. 16    MOVE.L    001E(A1),D1
  990. 6    AND.L    D0,D1
  991. 8    BNE.B    0XF82886
  992. 16    CMPI.B    #04,000F(A1)
  993. 8    BNE.B    0XF82896
  994. 14    AND.L    0016(A1),D0
  995. 8    BEQ.B    0XF82896
  996. 4    MOVE.L    A1,D0
  997. 12    MOVEA.L    (A1)+,A0
  998. 12    MOVEA.L    (A1),A1
  999. 12    MOVE.L    A0,(A1)
  1000. 16    MOVE.L    A1,0004(A0)
  1001. 4    MOVEA.L    D0,A1
  1002. 16    MOVE.B    #03,000F(A1)
  1003. 8    LEA    0196(A6),A0
  1004. 18    BSR.W    0XF819E6 -------->
  1005. 12    MOVE.B    0009(A1),D1
  1006. 12    MOVE.L    (A0),D0
  1007. 4    MOVEA.L    D0,A0
  1008. 8    BEQ.B    0XF819F8
  1009. 16    MOVE.L    0004(A0),D0
  1010. 16    MOVE.L    A1,0004(A0)
  1011. 12    MOVE.L    A0,(A1)
  1012. 16    MOVE.L    D0,0004(A1)
  1013. 4    MOVEA.L    D0,A0
  1014. 12    MOVE.L    A1,(A0)
  1015. 16    RTS ---------------------<
  1016. 14    CMPA.L    0196(A6),A1
  1017. 8    BNE.B    0XF82896
  1018. 16    SUBQ.B    #1,0126(A6)
  1019. 8    BGE.B    0XF828A4
  1020. 20    MOVE.W    #C000,00DFF09A
  1021. 12    MOVE.L    (A7)+,D0
  1022. 16    RTS----------------------------<
  1023. 60    MOVEM.L    (A7)+,D0-D1/A0-A3
  1024. 10    BRA.W    0XF82954
  1025. 16    SUBQ.B    #1,0127(A6)
  1026. 8    BGE.B    0XF82966
  1027. 12    TST.B    0126(A6)
  1028. 8    BGE.B    0XF82966
  1029. 12    TST.W    0124(A6)
  1030. 8    BMI.B    0XF82968
  1031. 16    RTS
  1032.  
  1033. 1164 TOTAL CYCLES! *238*3 = 831096 cycles!
  1034.  
  1035.  
  1036. 1 Obtain/ReleaseSemaphore pair takes 1400 cycles.
  1037. Since it should only take about 1800 cycles to draw one cell this has
  1038. nearly doubled the speed of the animatortask yet again.
  1039.  
  1040. If the board was filled with animated objects which were being redrawn at
  1041. the very slow speed of only 3 fps then that would take 999,600 cycles per
  1042. second on the A500.  That is about 14% of the total available CPU power
  1043. being constantly used just to execute Obtain/ReleaseSemaphore statements.
  1044.  
  1045.  
  1046. BUG: When you run out of spells in Texas Trash'em the game gets stuck.  You
  1047. can't choose a spell or exit the spell-choosing phase.  You are just stuck.
  1048.  
  1049. I played a test game on the 7.15909 Mhz 68000 and the computer casting of
  1050. trees was unbearably slow.  Once I find the code that controls this then
  1051. I'll see about speeding it up some.
  1052.  
  1053. * I just noticed that the animator is still animating at full speed even
  1054.   when the spell and creature information panels are being displayed.
  1055.   I had noticed a long time ago that the spell info screen is filled with
  1056.   text rather slowly on the 7.15909Mhz 68000 so I have adjusted the
  1057.   information panels to stop the animation while they are up.  This
  1058.   will speed up the display of text a bit plus lighten the multitasking load
  1059.   on the system while the gamer reads his spell description.  BTW: This is
  1060.   a good example of the clipping that the OS DrawImage routine does.  It
  1061.   clips the whole entire image and draws nothing when a full screen window
  1062.   is up.
  1063.  
  1064. * Made some corrections to the TeX of msg.tex.  Maybe I'll rewrite
  1065.   MSGrandom in asm for a 2x or 3x speed increase.  Woops, nevermind.  q is
  1066.   127773 which won't fit into a word.  The 68000 can only divide a longword
  1067.   by a word.  To divide a long by a long you must use an actual math
  1068.   routine so it may just as well be the C math routine. 8(  However if we
  1069.   ever made an 020+ version then I could easily make us an asm MSGrandom
  1070.   since the 020 and up can divide a long by a long.
  1071.  
  1072. * New function: WaitVBlank for display synchronized waiting.
  1073.  
  1074. ***** NEW INTRO
  1075. * Replaced old intro with "something more spectacular".
  1076. * Quadruple the resolution of the old intro.
  1077. * Same number of colors as the old intro (since the old one only used 8
  1078.   colors this was not hard 8) I only used 8 colors to conserve chipram and
  1079.   hopefully be able to include one of my Chaos Theme Songs along with the
  1080.   intro.
  1081. * Smooth Scrolling.
  1082. * Colorfading effect.
  1083. * The text has different colors and shadows each time for variety.
  1084. * ExtraLarge, easy to read, colorized fonts.
  1085. * Quadruple-Channel music played with the rather lame, buggy and
  1086.   system-unfriendly ptreplay.library.
  1087. * As far as strategy games go, the new intro-credits-presentation is fairly
  1088.   good but it is still quite lame compared to Action Games and
  1089.   Action/Strategy Games.
  1090. ***** END NEW INTRO
  1091.  
  1092. OOPS!  I was just about to add background music to the intro so I looked at
  1093. my filesizes: 410k, 550k, 393k, 250k.  Hmmm.. The intro music may just have
  1094. to require 1 meg of chipram.  Maybe the 250k one will fit.  The 250k one is
  1095. the simplest sounding one though.
  1096.  
  1097. I also have a SPECTACULARLY GOOD LOOKING 16color super-well-textured
  1098. ColorFont that we could use in the intro but the font is about 400k so I'll
  1099. probably just use it in the "2 Megs of chipram intro".
  1100.  
  1101. I couldn't do anything all day saturday or sunday due to lack of
  1102. electricity.
  1103.  
  1104. * PROBLEM:
  1105.   Games which require fonts to be copied into FONTS: have the following
  1106.   drawbacks:
  1107.   1. A lot of people have a FULL SYS: so there is NO room for new fonts.
  1108.   2. It makes installation more difficult.  Its just one more file that
  1109.      someone might forget to copy.
  1110.   3. When a person deletes the game from their harddrive, the stupid fonts
  1111.      are still in the FONTS: cluttering up the dir.
  1112.   4. I've played MANY games from aminet which required copying fonts into
  1113.      FONTS:  and I've played several games from aminet which required me to
  1114.      copy NOTHING but the game drawer onto my harddrive.  I always get a
  1115.      positive feeling when I just click on the gamedrawer of the game and
  1116.      drag it onto my harddrive and VOILA I am done!  That is how a game
  1117.      should be; easy to start up without even the TINIEST hassle.
  1118.   5. There are LOTS of lamers out there who are not good at copying files
  1119.      anywhere and just end up screwing things up.
  1120.   6. There are LOTS of other lamers out there who just won't bother with a
  1121.      game if they have to manually copy something.  These people will just
  1122.      never play our game.  Remember, there are lots of "ordinary" people
  1123.      out there who are not "into" computers like we are.
  1124.   7. I find it annoying when games have to have files copied into FONTS:,
  1125.      LIBS:, DEVS:, L: and S:
  1126.   8. After years of using my Amiga, my HD (especially FONTS: and S:) are
  1127.      cluttered up with tons of files which now serve no purpose since I 
  1128.      deleted the game years ago.
  1129.  
  1130.   9. Games (and all other programs) which put config files in S: are annoying.
  1131.      They should keep all their config files in their own damn directory.
  1132.  10. Games (and all other programs) which edit your startup-sequence to add an
  1133.      assign to their dir or subdir are HIGHLY annoying.  Let's see, I paid
  1134.      $400.00 for a state-of-the-art desktop publishing program with an 800k
  1135.      main executable and they couldn't include a few lines of code to do their
  1136.      own freaking assigns?!?!?!  Or find their files on their own some
  1137.      other way?!?!?!
  1138.  
  1139.  11. I guess you are aware that programs which add assigns to your
  1140.      startup-sequence are VERY common in the Amiga community.  I've never
  1141.      liked this because when you go to delete the program from your HD, YOU
  1142.      CAN'T!  You have to UNassign the assigns THEN delete the program
  1143.      and/or you have to edit your startup-sequence.  These are things that
  1144.      a gamer person should not EVER have to do.  Indeed, most gamers don't
  1145.      know HOW to do such things, that's why they bought Sega Genesis and
  1146.      Nintendo machines.
  1147.  12. Ideally, a game should be totally self-contained.  Self-contained
  1148.      games are just SO easy and fun to install and play.
  1149.  
  1150.  
  1151.     I haven't worked out how to make Chaos be completely self-contained and
  1152.     I don't know yet if such a goal is desirable for our game but all the
  1153.     problems MUST be eliminated.
  1154.  
  1155. * PROBLEM:
  1156.   I tried to open "fonts/union.font" (so it would just load the font from
  1157.   the current dir that chaos was running in) but it absolutely WOULD NOT
  1158.   WORK.  So I was stuck doing what most everybody else does and that is
  1159.   requiring the font to reside in FONTS:
  1160.  
  1161. * SOLUTION:
  1162.   After spending all day experimenting and talking to different programmers
  1163.   and doing research, here is what I worked out:
  1164.   1. The programmers all told me the same thing:
  1165.      A) Ditch 1.2/1.3 and just require OS2.04+  (indeed this would have
  1166.         made things MUCH easier.)
  1167.      B) Under 2.04+ you can just use PROGDIR: or you can just use the
  1168.         GetProgramDir function.
  1169.   2. But since I want to keep Chaos playable on every Amiga for as long as
  1170.      possible and since there are a lot of people who still use 1.3 I came
  1171.      up with a way that will work on all amigas and OS revisions.
  1172.  
  1173.   3. I have implemented some simple code at the beginning of CommenceChaos
  1174.      to determine the currentdir and then Assign ChaosGame: to that dir.
  1175.      So now we can load fonts from "ChaosGame:fonts/fontname.font" and
  1176.      everything works great!
  1177.   4. This nifty way of doing things will become more and more important in
  1178.      the future as we utilize more fonts in the game.
  1179.   5. I presume that this has also solved the problems of loading my
  1180.      ChaosThemeSongs, sound effects and other things.
  1181.   6. Chaos doesn't require its gamefonts to reside in FONTS:, the user
  1182.      doesn't have to make any assigns and Chaos does not have to edit the
  1183.      s:user-startup.
  1184.  
  1185.  
  1186. I don't know what to do about libs:  I really like having libraries in my
  1187. libs: dir but Chaos requires 2 different versions of reqtools.library.  It
  1188. needs one version for OS 1.3 and another version for OS2.04+.  I guess
  1189. we'll just have to make an install script maybe...  I'll worry about it
  1190. later.
  1191.  
  1192. * 2 new asm functions: pal and ntsc.  To switch into either video mode
  1193.   instantly on any ECS Agnus equiped Amiga. Which means _any_ Amiga
  1194.   manufactured in the 1990's plus some of the Amigas from 1989 plus anybody
  1195.   who upgraded their old Amigas to an ECS Agnus.
  1196.  
  1197. * Computer Tree Casting Speedup Plan:
  1198. * 1. Getxy(c,&x,&y) asm routine which is around 11x as fast as
  1199.      x = cell % GAMECOL;
  1200.      y = cell / GAMECOL;
  1201.      Replaced the above code in CheckTree with Getxy(c,&x,&y);
  1202.  
  1203. ** Referring now to DoComputerCast
  1204. * 2. Replaced 5 occurrences of isDead(i) macro with the isdead simple
  1205.      variable.
  1206.  
  1207. * 3. REPLACED:
  1208.        my = i / GAMECOL - cell / GAMECOL;
  1209.        mx = i % GAMECOL - cell % GAMECOL;
  1210.        if ((float)(mx * mx + my * my) >= d * d) continue;
  1211.      WITH:
  1212.        if ((float)SqDistance(i,cell) >= d * d) continue;
  1213.  
  1214. * 4. Rearranged the order of the tests to work faster for trees.
  1215. * 5. Logically avoided 5 of the if tests.
  1216. * 6. Replaced 9 occurrences of code in cast.tex with Getxy();
  1217.      1 in prog.tex, 7 in cmove.tex, 8 in move.tex.
  1218.  
  1219. I replaced the following form of code sequences.  Is this the proper usage
  1220. of the & operator in this case???  If this is wrong then please tell me.
  1221.                 Getxy(c,&wizards[WarpWizard[i]-1].x,&wizards[WarpWizard[i]-1].y);
  1222. //                wizards[WarpWizard[i] - 1].x = c % GAMECOL;
  1223. //                wizards[WarpWizard[i] - 1].y = c / GAMECOL;
  1224.  
  1225.  
  1226.  
  1227. * 7.11 YIPERS!  GAMESPACE is not a variable.  It isn't a constant either! 
  1228.      It is a #defined _expression_!!!!!
  1229.  
  1230.     #define GAMESPACE    (GAMEROW * GAMECOL)
  1231.  
  1232.     GAMECOL is a constant while GAMEROW is a variable.
  1233.     This means that all the zillions of loops like:
  1234.     for (i = 0; i < GAMESPACE; i++)
  1235.     are actually having to _evaluate_ GAMESPACE each time through the loop!
  1236.     That means that the cycles of one of those complicated C multiplication
  1237.     routines are being wasted each time through the loop.
  1238.     This was slowing down LOTS of loops.  Even the loop for the animator
  1239.     uses GAMESPACE.
  1240.  
  1241. * Above problem FIXED and speeded up.
  1242.  
  1243. GetCell(x,y); in ASM!
  1244. I just looked at the C-generated ASM code for GetCell(x,y) and I could
  1245. definitely make an asm version that is about twice as fast BUT the reason
  1246. for this is simply that C is doing a full 32-bit multiply because x,y are
  1247. defined as ints instead of words.  So now I must decide whether to try to
  1248. switch the entire program over to using words for x,y coords or just
  1249. writing the asm routine to take the x,y ints and use them as words.
  1250. Do you have any opinions on this?
  1251.  
  1252. * Test GetCell((UWORD)x,(UWORD)y); to see the code that is generated.
  1253.   The Trouble is that GAMECOL is defined as an int. hmm....
  1254.   Change macro to (UWORD)GAMECOL and see what happens.
  1255.  
  1256.   OK I changed the GetCell macro to:
  1257.   #define GetCell(x,y)     (((UWORD)y) * (UWORD)GAMECOL + ((UWORD)x))
  1258.  
  1259.   And the C compiler generated MUCH better code; a good 2x to 3x speed
  1260.   increase. It saved a bsr/rts and *2* multiply instructions plus more!
  1261.   Here is a listing of the new MUCH improved code:
  1262.        | 144C  202F 0084                      MOVE.L      0084(A7),D0
  1263.        | 1450  2239  0000 001A-02             MOVE.L      02.0000001A,D1
  1264.        | 1456  C1C1                           MULS.W      D1,D0
  1265.        | 1458  2205                           MOVE.L      D5,D1
  1266.        | 145A  7400                           MOVEQ       #00,D2
  1267.        | 145C  3401                           MOVE.W      D1,D2
  1268.        | 145E  D082                           ADD.L       D2,D0
  1269.        | 1460  2C00                           MOVE.L      D0,D6
  1270.  
  1271.   Now I will test:
  1272.   #define GetCell(x,y)     (((UWORD)y) * (UWORD)GAMECOL + (x))
  1273.   This should allow us to save 2 additional machine instructions.
  1274.        | 144C  202F 0084                      MOVE.L      0084(A7),D0
  1275.        | 1450  2239  0000 001A-02             MOVE.L      02.0000001A,D1
  1276.        | 1456  C1C1                           MULS.W      D1,D0
  1277.        | 1458  D085                           ADD.L       D5,D0
  1278.        | 145A  2C00                           MOVE.L      D0,D6
  1279.   WOW!  Check that out!  It saved *3* instructions! (6 bytes)
  1280.   57 occurences of GetCell * 6 bytes=342 additional bytes saved.
  1281.   Maximum efficiency achieved!  No need for an asm version.
  1282.  
  1283.  
  1284.  
  1285. * Speed up MSGRandom:  Here is the old code (34 lines)
  1286.        | 0028  2039  0000 0000-01             MOVE.L      01.00000000,D0
  1287.        | 002E  223C 0001 F31D                 MOVE.L      #0001F31D,D1
  1288.        | 0034  6100  0000-XX.1                BSR.W       __CXD33
  1289.        | 0038  2001                           MOVE.L      D1,D0
  1290.        | 003A  E980                           ASL.L       #4,D0
  1291.        | 003C  9081                           SUB.L       D1,D0
  1292.        | 003E  2400                           MOVE.L      D0,D2
  1293.        | 0040  E582                           ASL.L       #2,D2
  1294.        | 0042  D480                           ADD.L       D0,D2
  1295.        | 0044  EB82                           ASL.L       #5,D2
  1296.        | 0046  D481                           ADD.L       D1,D2
  1297.        | 0048  2002                           MOVE.L      D2,D0
  1298.        | 004A  E780                           ASL.L       #3,D0
  1299.        | 004C  9082                           SUB.L       D2,D0
  1300.        | 004E  2F40 0008                      MOVE.L      D0,0008(A7)
  1301.        | 0052  2039  0000 0000-01             MOVE.L      01.00000000,D0
  1302.        | 0058  223C 0001 F31D                 MOVE.L      #0001F31D,D1
  1303.        | 005E  6100  0000-XX.1                BSR.W       __CXD33
  1304.        | 0062  2200                           MOVE.L      D0,D1
  1305.        | 0064  E581                           ASL.L       #2,D1
  1306.        | 0066  9280                           SUB.L       D0,D1
  1307.        | 0068  2401                           MOVE.L      D1,D2
  1308.        | 006A  E982                           ASL.L       #4,D2
  1309.        | 006C  9481                           SUB.L       D1,D2
  1310.        | 006E  D482                           ADD.L       D2,D2
  1311.        | 0070  9480                           SUB.L       D0,D2
  1312.        | 0072  D482                           ADD.L       D2,D2
  1313.        | 0074  9480                           SUB.L       D0,D2
  1314.        | 0076  E582                           ASL.L       #2,D2
  1315.        | 0078  D480                           ADD.L       D0,D2
  1316.        | 007A  E582                           ASL.L       #2,D2
  1317.        | 007C  202F 0008                      MOVE.L      0008(A7),D0
  1318.        | 0080  9082                           SUB.L       D2,D0
  1319.        | 0082  2E00                           MOVE.L      D0,D7
  1320.  
  1321. Here is the new code after changing the C code to use DIVL: (33 lines)
  1322.        | 0028  2039  0000 0000-01             MOVE.L      01.00000000,D0
  1323.        | 002E  223C 0001 F31D                 MOVE.L      #0001F31D,D1
  1324.        | 0034  486F 000C                      PEA         000C(A7)
  1325.        | 0038  6100  0000-XX.1                BSR.W       @ldiv
  1326.        | 003C  584F                           ADDQ.W      #4,A7
  1327.        | 003E  202F 0010                      MOVE.L      0010(A7),D0
  1328.        | 0042  2200                           MOVE.L      D0,D1
  1329.        | 0044  E981                           ASL.L       #4,D1
  1330.        | 0046  9280                           SUB.L       D0,D1
  1331.        | 0048  2401                           MOVE.L      D1,D2
  1332.        | 004A  E582                           ASL.L       #2,D2
  1333.        | 004C  D481                           ADD.L       D1,D2
  1334.        | 004E  EB82                           ASL.L       #5,D2
  1335.        | 0050  D480                           ADD.L       D0,D2
  1336.        | 0052  2202                           MOVE.L      D2,D1
  1337.        | 0054  E781                           ASL.L       #3,D1
  1338.        | 0056  9282                           SUB.L       D2,D1
  1339.        | 0058  202F 000C                      MOVE.L      000C(A7),D0
  1340.        | 005C  2400                           MOVE.L      D0,D2
  1341.        | 005E  E582                           ASL.L       #2,D2
  1342.        | 0060  9480                           SUB.L       D0,D2
  1343.        | 0062  2602                           MOVE.L      D2,D3
  1344.        | 0064  E983                           ASL.L       #4,D3
  1345.        | 0066  9682                           SUB.L       D2,D3
  1346.        | 0068  D683                           ADD.L       D3,D3
  1347.        | 006A  9680                           SUB.L       D0,D3
  1348.        | 006C  D683                           ADD.L       D3,D3
  1349.        | 006E  9680                           SUB.L       D0,D3
  1350.        | 0070  E583                           ASL.L       #2,D3
  1351.        | 0072  D680                           ADD.L       D0,D3
  1352.        | 0074  E583                           ASL.L       #2,D3
  1353.        | 0076  9283                           SUB.L       D3,D1
  1354.        | 0078  2E01                           MOVE.L      D1,D7
  1355. The line saved was the expensive subroutine call to perform the 2nd
  1356. division operation.
  1357.  
  1358. I traced through both versions real quick and it looks like they are both
  1359. the same speed due to the ldiv routine containing 2 subroutine calls.  It
  1360. looks like ldiv does the exact same thing as x / y ... x % y 
  1361. This is probably a case where ldiv is _supposed_ to be faster but the
  1362. compiler writers never made an optimized version.  I will leave the
  1363. original code intact for now and maybe I will do a detailed cycle count
  1364. later.
  1365.  
  1366. * Changed:
  1367.     if ((isGrowth (i) || isCloaked (i)) && spell == CloakID)          continue;
  1368.     if ((isUndead(i)) && spell == LichID)              continue;
  1369.     if (!(isUndead(i)) && (castinfo & CAST_UNDEAD))    continue;
  1370.  
  1371.   To:
  1372.     if (spell==CloakID && (isGrowth (i) || isCloaked (i)))   continue;
  1373.     if (spell==LichID && (isUndead(i)))                      continue;
  1374.     if ((castinfo & CAST_UNDEAD) && !(isUndead(i)))          continue;
  1375.  
  1376.   Result = faster code = saves the execution of 27 instructions.
  1377.  
  1378.  
  1379. * NOW, after all that, computer treecasting should be noticeably faster on
  1380.   the A500 than before.
  1381.  
  1382.   Growth Rates are still a bit too high but especially Violet Fungi so:
  1383. * I just changed SPUD_CONSTANT from 5 to 6 and FUNGI_RATE from 30 to 40 in
  1384.   at attempt to keep growths from taking over the world.  Now I've played
  1385.   some test games with it like this and it seems just GREAT!  Now it is
  1386.   working the way I envisioned it!  (Except I haven't tested Purple Fungi
  1387.   yet so I don't know about them.)
  1388.  
  1389.   Can't see the Ogre Mage shot most of the time so:
  1390. * I inserted a WaitTOF(); into the BirdShot routine to hopefully fix this.
  1391.   The BirdShot uses BLOB_WEAPON which is the easiest to draw.  I think it
  1392.   had just been drawing to fast.
  1393.  
  1394. * BUG: Bird Lord shot me and it didn't redraw my cell. (I was invulnerable
  1395.   at the time, if that makes any difference)
  1396.   Bird Lord shot another creature and it was redrawn properly.
  1397.   NOW FIXED.
  1398.  
  1399. * The 2nd voice sample in ChaosTheme1 just didn't sound right so I deleted it
  1400.   and saved 49k.  Now my small themesong is only 201k.  Hopefully that will
  1401.   fit into a 512k chipram intro.
  1402.  
  1403.  
  1404. **** After months of not playing a single serious game I decided to play a
  1405.      real game.  Here are the results of the Tuesday Playtesting.
  1406.  
  1407. A wizard with lots of creatures and a doube-triple put all 6 of his armours
  1408. on the _same_ creature even though he had other creatures that were
  1409. wounded.  He wasted at least half of his armours.
  1410.  
  1411. Same game later on...  Right now there is a DEAD pegasus.  It says dead and
  1412. it has the dead image.  Yet it has life and people are attacking it.  ??
  1413. It was next to a shadowwood so maybe when a ShadowWood kills something this
  1414. is what happens?  This was probably caused by a growth and is probably
  1415. FIXED now.
  1416.  
  1417.  
  1418. Fire covered up my wizard who was on a horse but it didn't kill my team and
  1419. it didn't put my creatures to sleep and I could still play (but without my
  1420. wizard).
  1421. When I click on the cell that I was on I can see my powerups just like as
  1422. if I was in a tree.
  1423. Next turn I killed the fire with my creatures and uncovered my wizard and
  1424. everything was back to normal.
  1425. ****** END OF TUESDAY PLAYTEST.
  1426.  
  1427.  
  1428. ********** Thursday Playtesting. **********
  1429. * Thursday: Relatives came over and we played 2 games of chaos.  The
  1430.   first one only lasted about 5 turns because my tree collapsed and I was
  1431.   simultaneously attaced by 2 Platinum Dragons and 1 Golden Dragon and they
  1432.   didn't want to play after I was dead.  The second game only lasted 5
  1433.   turns also because the electricity went off. 8(  Here are the BUGS we
  1434.   found:
  1435.  
  1436. * HighlightSprite kept highlighting some tree each time it was Matt's turn.
  1437.   (he was player 3)  No big deal, it just looks funny.  We kept making
  1438.   jokes that he must have a "Magic Owl" in that tree or something. FIXED.
  1439.  
  1440. * Independent Spiderwebs didn't show up at first due to no ReDrawCell
  1441.   command.  FIXED.
  1442.  
  1443.   2 different Computer Wizards cast CLOAK and then aborted the spell
  1444.   because they were in a tree and they had no creatures yet.
  1445.  
  1446.   They all agreed that the statnumbers should be more uniform.  Like all
  1447.   0-7 or all 0-15 or all 0-63. (or at least nearly all the same)
  1448.   This subject was brought up because this was the first time they had ever
  1449.   seen the numbers on the info panel.  They _really_ liked that.
  1450. *********** End of Thursday Playtesting ****
  1451.  
  1452. FRIDAY == 3 WEEK DEADLINE.... Did not hear from you.
  1453.  
  1454. **** Friday Playtesting:
  1455.  
  1456. * When a growth no longer covers a dead body the body becomes "unalive"
  1457.   FIXED.
  1458.  
  1459. Computer wizards aborted Combat, Cloak, Raise Dead.
  1460.  
  1461. A Computer-controlled wizard just mounted an independent Nightmare!
  1462. But then someone killed the nightmare so I never got a chance to look at it
  1463. on the info screen.  Maybe the explanation is that the wizard just subverted
  1464. it when I wasn't looking?
  1465.  
  1466. 4th from the bottom, 7th from the right, the green ooze is being drawn 1
  1467. pixel too far down.  Cell coords must be off for that cell.
  1468. it is DEFINITELY being redrawn 1 pixel too low.
  1469.  
  1470. Sometimes the blob is drawn off by about 3 pixels.
  1471.  
  1472. I moved my wizard into this strange square and at first it drew it
  1473. correctly but then it moved it down 3 pixels.   Strangness.
  1474. At this point the xpixel[] and ypixel[] arrays are working but the
  1475. ancol[]/anrow[] arrays got corrupted somehow.  There must be some bug that
  1476. writes out some data to a place it isn't supposed to.  Possibly it does a
  1477. +=3 or a +=4 to account for the 3 or 4 pixel offset.
  1478. But there are no occurrences of +=3 or += 3 8(
  1479. Now that I think about it, at first it was off by 1 so maybe it was several
  1480. +=1 operations somewhere.  This is all probably related to the wizard with
  1481. LichLord being covered by my green blob.
  1482. Whatever bug caused this could easily be causing those spurious crashes.
  1483. The game hasn't crashed on me in a very long time.
  1484.  
  1485.  
  1486. Blob covered up computer wizard and "killed" him but the game didn't end
  1487. and his powerups show when I click on that blob. This might be because the
  1488. computer wizard in question has LichLord.
  1489.  
  1490. Next Turn:
  1491. WOW! Now the covered wizard just cast invulnerability on himself.
  1492. He can't attack or move though, apparently.
  1493.  
  1494. Next Turn:
  1495. Now he just vengeanced my elephant!
  1496.  
  1497. Next Turn:
  1498. Now he cast a Spectre!  And he is still covered up by the green blob.
  1499.  
  1500. As far as I can tell this is exactly the way it is suposed to work due to
  1501. him having LichLord.  I have no complaints.  It is just freaky. 8)
  1502. **** END Friday Playtesting.
  1503.  
  1504. Sunday: Tried to make an autobooting version of Chaos for 1.3.  I've done
  1505. this before and it always worked but now it loads then crashes.  I don't
  1506. know why but it might be because of that stupid ptreplay.library.
  1507. I went to an awful lot of trouble to avoid using OS2.0+ functions so that
  1508. it would work on all Amigas.
  1509.  
  1510. Ok, I just tested it and it DEFINITELY is the ptreplay.library that is
  1511. causing the crash on the 68000.
  1512.  
  1513. Monday-Tuesday Job Fair.
  1514.  
  1515. Tuesday Night:
  1516. * Speeded up WeaponEffect
  1517. * Speeded up ThreeBeam
  1518.  
  1519. * On a screenfull of creatures I often can't spot the victim of a
  1520.   DarkPower/Justice/Exorcise/Vengeance so now the victim is HighLighted.
  1521.  
  1522.  
  1523. 1 week goes by...
  1524.  
  1525. Tuesday Morning: Begin version 1.81
  1526. * Improved the Docs to be in sync with the new version 1.8 features.
  1527.  
  1528. * Acquired the OctaMED/RBF software play routines directly from
  1529.   Ray Burt-Frost himself.  I have no idea if I am actually going to use
  1530.   any of it though.
  1531.  
  1532. * Put my Lame old icon into the distribution.
  1533.  
  1534. 1 week goes by...
  1535.  
  1536. Tuesday Morning:
  1537. * Fixed off-center WizardExplode.
  1538. * Changed descriptions of Dark Power, Exorcise, Justice, Vengeance,
  1539.   Consecrate, Invert and Brain Boost.
  1540. * Inserted CheckPixelArrays(); code in the beginning and ending of most
  1541.   functions to try to find that screwed up mysterious bug.
  1542.  
  1543. Violet Fungi growth rate STILL WAY TOO HIGH.
  1544. * I have now instituted a new growth formula which will hopefully make the
  1545.   growths do what we wanted.  And I put SPUD_CONSTANT back down to 5 like
  1546.   it used to be.
  1547.  
  1548.  
  1549. On AnRow check it got an error at x=2.
  1550. AnRow[2]=0 but somehow AnRowBackup[2]=161!!!!
  1551. AnRow[3]=7 but somehow AnRowBackup[3]=65 !!!!
  1552. AnRow[4]=0 but somehow AnRowBackup[4]=193!!!!
  1553. AnRow[5]=0 but somehow AnRowBackup[5]=97 !!!!
  1554.  
  1555. Detected on first line of ReDrawCell, called from cMoveNonEngaged in cmove.c line 316
  1556. Power went out.  Start over.
  1557.  
  1558.  
  1559. 5 hours later... Bug detected again.  This time an Elemental is highlighted.
  1560. AnRow[9]=162  but AnRowBackup[9]=161
  1561. AnRow[10]=833 but AnRowBackup[100=65
  1562. Called from Reinstate move.c 248 (cell param=224 wizard_warn=0 board[cell].id=59)
  1563.  which was called by move.c Combat line 539 (defence=224)
  1564.  
  1565. * Sheesh!  I finally tracked it down completely.
  1566.   It turns out to be a bad subscript error.
  1567.   The trouble was with granting a bonus spell to the independents upon
  1568.   killing a tough creature.  In this instance an Independent Elemental
  1569.   killed a Golden Dragon and so a bonus spell was marked in
  1570.   wizards[player-].BonusSpells But wizards doesn't have that many elements
  1571.   (9-1)=8 and wizards highest element was 7.
  1572.   *** NOW FIXED *** by increasing the size of wizards by 1.
  1573.  
  1574.   Here is the code that triggered the bug:
  1575.     if ((bonus = board[defence].char_stat.BonusSpellPick))
  1576.         {
  1577.         wizards[player - 1].BonusSpells += 1;
  1578.         wizards[player - 1].BonusSpellsPick += bonus;
  1579.         AUDIOPlay (1000,10,1,20);
  1580.  
  1581. * Trying out a new growth formula.
  1582.  
  1583. * You will notice that there are tons of calls to CheckPixelArrays();
  1584.   I don't want to go through and delete all these calls because I intend to
  1585.   use these calls to check for other corrupted variables.  So if you don't
  1586.   like the way it slows your 25Mhz 030 down to 7Mhz 000 speed then you can
  1587.   just comment out all the code inside the function itself; making it a
  1588.   null function or perhaps we could use conditional compiling?  Smake dev
  1589.   compiles those lines while smake release doesn't?
  1590.  
  1591. * I just came in the room and looked at the screen and I noticed something:
  1592.   The graphics seemed much more appealing than they used to be.  The screen
  1593.   is filled with all sorts of little animated critters  plus loads of webs
  1594.   and some earthquakes.  It just all looks enticing and interesting
  1595.   somehow.  All the extra movement from the faster frame rate makes
  1596.   everything more exciting.
  1597.  
  1598. Monday:
  1599. * Allegedly fixed the bug where computer wizards cast Raise Dead on
  1600.   growths.
  1601.  
  1602. * Allegedly fixed the problem of Computer Wizards casting Armour on
  1603.   creatures with max life.
  1604.  
  1605. ================== End Version 1.8x  ===============================
  1606. ================== Begin Version 1.9 ===============================
  1607. --- Star of changes made by SAI ---
  1608. * Incorporated new image data.
  1609. * Added C image drawing program, to compile to a "smake image"
  1610. * Modified lmkfile and makechaos to generate my chaos font
  1611. * Added the following new spells:
  1612.   Derro, Mud Man, Spriggan, Agathion, Annis, Azer, Banderlog,
  1613.   Bodak, Cat Lord, Jann, Marid, Shade, Dao, Bandit, Hybsil,
  1614.   Fire Bat, Shadow Dragon, Spectator, Crimson, Drelb, Haunt,
  1615.   Juju, Solar, Quickshot, Discard, Boil, Passage.
  1616. * Note, I could find not evidence of you changing the descriptions
  1617.   of Invert, Justice and so on. I assume you did it in pool.txt
  1618.   but apart from my new spells no significant differences could
  1619.   be found between the files.
  1620. * Fixed the graphics for the golden and platinum dragon.
  1621. * Played a game; quickly remembered that I hadn't finished the coding
  1622.   for all my new spells. The image for Quickshot has some how got
  1623.   inverted, very strange. There were still lots of dead wizards
  1624.   lying about the screen. A cloaked sleeping dragon did not appear
  1625.   cloaked on the screen. The program crashed when a manticore shot
  1626.   a magic wood tree.
  1627. * Made a change in move.tex hopefully to stop dead wizards.
  1628. * Added the SPRITES flag to the Chaos screen.
  1629. * Discovered that CHAOSANIM is causing a huge number of enforcer
  1630.   violations. I suspect this may be because there is an unbalanced
  1631.   ReleaseSemaphore in the program. It seems to start happening
  1632.   after a wizard dies. I removed my changes, but it didn't improve
  1633.   the situation.
  1634. * My monitor started flickering on an off, so I quickly made up an
  1635.   archive of what I had done in case it blows up.
  1636. * Completed the preliminary coding for the spell manager for creatures.
  1637. * Completed spell files up to Stone Golem (it is taking a while to do
  1638.   each one, but I figure it will be helpful in the long run).
  1639. * Perhaps the crashes are due to problems accessing HighLight variables.
  1640. * Fixed a bug wherby a dead wizard with the "Uncertainity" spell could
  1641.   result in dead creatures being case as if they were alive.
  1642. * Allegedly modified te freeze spell to work on independents.
  1643.   -JC tested this and it really works.
  1644. * Major Discovery: If I boot from a floppy by-passing my usual startup
  1645.   then the game worked much better in that JC sprite appeared. Therefore,
  1646.   I am going to have to investigate my startup sequence to find what
  1647.   causes this.
  1648. * Done spell files up to and including vampire.
  1649. * Completed spell files for all objects on the board.
  1650. * Whew, I have just finished making spell files for all our
  1651. spells (all 255 of them, now I added my new ones). The next
  1652. one should be interesting since any byte quantities hanging
  1653. around related to spells might break. Well, I won't be
  1654. adding any more for a little while anyway.
  1655. * Now trying to incorporate changes.
  1656. * Change the ordering of spells by swapping LichLord with Mutate
  1657.   (so that all computer assistance spells come after consecrate).
  1658. * Deleted initial_data, names, and speech from prog.tex
  1659. * Deleted chaos.prb and ranking information from spell.tex
  1660. * Deleted castinfo and computer assist arrays from cast.tex
  1661. * Made appropriate changes to make file.
  1662. * Now testing the spell manager. Having a few minor problems with the
  1663.   script I wrote. Added a FAILAT to stop if halting for no real
  1664.   reason.
  1665. * Deleted reincarnation table from move.tex.
  1666. * Deleted index.h pool.txt makedata.txt from archive.
  1667. * Now trying to remake entire game from archive. Problems: changed
  1668.   targets for info.o. Fixed problem with index.h. There is a problem
  1669.   with makedata.txt, for testing overcame by deleting lines. It is
  1670.   caused by bad referencing of statics. I will have to change the
  1671.   spell manager to cope with this.
  1672. * OK it all compiled and I proceeded to play a game. The was obviously
  1673.   a problem reading "chaos.prb" because all the spells were unusual ones.
  1674.   Fixed that problem. But then the game crashed just after a wizard died.
  1675.   Suspecting my fix to stop dead wizards I have temporarily disabled it.
  1676.   The whole problem of killing wizards needs a good going over and
  1677.   rationalization.
  1678. * Eventually the spell manager could be modified to print nice tables
  1679.   of creature abilities for inclusion in the manual.
  1680. * Fixed alignment of first set up screen.
  1681. * Made the game load my font from a local directory by following JC
  1682.   example. However, I noticed you used FPB_DISKFONT instead of
  1683.   FPF_DISKFONT (I wonder who is right). I've left it for the moment.
  1684.   I wonder if this could have something to do with SetSoftStyle bug.
  1685. * Fixed some bugs to do with scoring.
  1686. * Allegedly changed Texas'em so that when less than six spells remain
  1687.   no discard is required. This probably needs some sound to stop people
  1688.   clicking on each others spells. Tested OK.
  1689. * Added variant spider webs, this has pushed the number of spells over
  1690.   255 and some problems might occur.
  1691. * In testing I have observed a number of Enforcer hits corresponding
  1692.   to long reads. Reasons remain unknown.
  1693. * Fixed the loading/saving problem. It was caused by a single line
  1694.   missing from the start.tex file (InitLoad();)
  1695. * Added some mechanism for a turn counter. There is no warning that
  1696.   the game is about to end, also the scores aren't shown at the end.
  1697. * Replaced About menu.
  1698. * Added turn counter and discarding flag to the save file.
  1699. * Fixed a bug relating to the Dao.
  1700. * Elimited the single pixel blue line from the top of the screen.
  1701. * Replaced the new game menu.
  1702. * Completed implementation of the discard spell.
  1703. * Completed implementation of the quickshot spell (image still revesed tho).
  1704. * Just noticed that team scoring is broken. Something I changed here
  1705.   is screwed up.
  1706. * Fixed screen clearing when loading a saved game.
  1707. * Discovered a potential problem with the semaphore in Reinstate, this
  1708.   makes sense for the causes of all my recent crashes, attempting fix.
  1709. * Split the WeaponEffect procedure into two parts so it is more versatile
  1710.   (planning to use it in the Quit menu).
  1711. * Replaced the quit menu.
  1712. * Only the file menu now relies on reqtools, and will continue to do
  1713.   so in the mean time.
  1714. * Since it is possible that JC will lose account I am now making a new
  1715.   archive and testing a complete remake. If it works I send it.
  1716.  
  1717.  
  1718. * Rewrote the Reinstate function, thereby eliminating KillWizard,
  1719.   Reincarnate and KillElemental.
  1720. * Fixed yet another bug to do with discarding.
  1721. * Fixed a problem relating to the Eartquake and my change to the Reinstate
  1722.   function
  1723. * Incorporated JC font changes.
  1724. * Incorporated JC spell description changes.
  1725. * Made the solar always move on its own accord.
  1726. * Made the Cat Lord more rigourous. Technically, there should only ever be
  1727.   one Cat Lord at a time (ok, there are some ways around this, but they
  1728.   will probably be entertaining if they occur, so I'm leaving them). The
  1729.   Cat Lord should now move all cats. The latest code does prevent multiple
  1730.   Cat Lords from being cast or generated.
  1731. * Put all the code for CastFree spells in the appropriate spell files.
  1732.   Modified the spell manager to automatically amalgamate this code and
  1733.   put it in a file to be included by cast.tex.
  1734. * It is still sticking an image when a generator dies. This is wrong. I
  1735.   think it may be because we are the near the byte limitation, I am trying
  1736.   a temporary fix, soon I will change all id fields to words instead of
  1737.   chars.
  1738. * Had a brief go at doing favourite food etc., but remembered that because
  1739.   of a change to the cell scoring (in that it now does it once rather than
  1740.   for each and every creature) that it will be harder to do this than I had
  1741.   imagined.
  1742. * Completed implementation of the haunt and solar.
  1743. * Did some optimisation and tidying up of BoardUpdate.
  1744. * Implemented computer discarding for Texas trash'em.
  1745. * Stopped computer wizards from attempting Cat Lord while one on screen.
  1746. * Fixed a problem with dead graphics.
  1747. * Implemented agent casting of general magic spells.
  1748. * Completed implementation of Agathion.
  1749. * Allowed faun to cast sleep.
  1750. * Allowed azer to cast quench.
  1751. * Stopped horrors reproducing after the first time.
  1752. * Completed implementation of Dao.
  1753. * Agents now highlighted and show owner when casting.
  1754. * Completed implementation of Jann, Dao, and Marid.
  1755. * Stopped Justice, Dark Power, and Vengeance on growths.
  1756. * Allegedly fixed scoring (now tested, it looks ok).
  1757. * Changed the basic cell id to a UWORD, this gives a lot more freedom
  1758.   for making new spells.
  1759. * Tidied up some of the documentation in prog.tex and moved all the menu
  1760.   stuff to a separate file, menu.tex.
  1761. * Did a complete rebuild, it took 43 minutes.
  1762. * Moved all the magic spell handlers to the appropriate spell files.
  1763. * Changed the reincarnation table to be USHORT rather than UBYTE
  1764. * Made the spell manager write a TeX table of basic abilities. Later I
  1765.   will make other tables and convert them to PostScript.
  1766. * Turned on highlighting for Speed and Slow spells
  1767. * Turns remaining now displayed on the far right of the screen at the top.
  1768. * Turn counter stuff now works reasonably well. The game will stop when
  1769.   all turns are exhausted and the scores will be given.
  1770. * While team scores now seem correct, the don't appear correctly sorted;
  1771.   this looks like another +/- 1 type problem, that my brain just doesn't
  1772.   feel like trying to fathom at the moment.
  1773. * Added StartTiming and EndTiming to prog.tex (at the end). Didn't have
  1774.   time to test it much but hopefully it will do what you want.
  1775.  
  1776. TODO:
  1777.  - Computer use of favourite food stats
  1778.  - Elimination of reqtools
  1779.  - More production of TeX/PS tables of abilities.
  1780.  - Find exec.dis and stamps for JC
  1781.  - Power up goodies on screen
  1782.  - Complete Passage [now made prob 0 pending appropriate solution]
  1783.  - Make computer use of reincarnation more intelligent
  1784.  
  1785. - Start of changes by JJC -
  1786. * Problem: Start Chaos and Quit.  An Alert pops up (like a guru but yellow
  1787.   and non-fatal) that says "Recoverable Error: 0100 0008"
  1788.   I looked it up and that means "Damaged Semaphore".  NOW FIXED.
  1789.  
  1790. * Test a medmod with the cli medplayer program to see if it shares channels
  1791.   or not.  IT DOESN'T.
  1792.  
  1793. * Edited descriptions of Marid,Rat.
  1794.  
  1795. * Fixed up Timing Code.
  1796.  
  1797. * After an hour of getting bizarre results I have reached the conclusion
  1798.   that the SASC Timer function does NOT have microsecond resolution.
  1799.   Instead it has 1/60th second resolution and it then adds +/- 1 to 3
  1800.   microseconds onto that result.
  1801.  
  1802. * Implemented asm TestPixel.
  1803.   Time to Test 32 rows of 320 pixels on a 5 bpl lores screen on 25Mhz 030
  1804.   ReadPixel 500009us
  1805.   TestPixel 100002us
  1806.  
  1807.   So TestPixel is about 5x as fast as ReadPixel.
  1808.  
  1809.   
  1810. * When simulacrumming an unanimated creature with double in effect it is not
  1811.   drawn immediately. In fact it isn't drawn till something triggers
  1812.   ReDrawAll=YES.  NOW FIXED.
  1813.  
  1814. Subversion appears broken.  Player 1 subverted a White Dragon and it made the
  1815. success sound but didn't make it mine.  Player 2 just subverted a different
  1816. White Dragon and it made the success sound and it DID make it mine... hmm..
  1817. The only thing I can figure is that the spell works perfectly and I just
  1818. mistook the sound effect.
  1819.  
  1820. * I noticed that Reflector always did exactly 3 points of damage to the
  1821.   shooter rather than actually "reflecting" the damage back to the shooter.
  1822.   e.g. A White Dragon shot me and it should have "reflected" 9 points of
  1823.   damage back to him but instead only did 3.
  1824.   Also, if the wizard had a 15 Ranged Combat Rating then even a Camel would
  1825.   get hit with 15 points of retaliatory damage.
  1826.   Also, if an Undead Shooter shoots an ordinary Reflectified Wizard then
  1827.   the damage does NOT reflect onto the shooter; instead it is an "invalid
  1828.   attack, cannot attack undead"
  1829.  
  1830.   So in fact either the spell should be renamed to "Retaliation" or
  1831.   "Retaliatory Strike" or the Reflector Spell Code should be reworked to
  1832.   actually "reflect" the incoming damage.
  1833.  
  1834.   I chose to rework the code so now the exact damage is always reflected
  1835.   onto the shooter.  Even the exact _type_ of damage is reflected:
  1836.   Intelligence damage is reflected as Intelligence damage. Ditto for
  1837.   poisoning and all the other stats.
  1838.  
  1839. I cast Reincarnation on my Manticore which my wizard was riding at the time
  1840. but when they killed my Manticore it didn't reincarnate into a Centaur!  It
  1841. just died and disapeared like usual! 8(
  1842.  
  1843. * Implemented linearly equidistant ascending order bitplanes.  Works fine.
  1844.   From now on all custom gfx routines can gain an extra 15% or more speed
  1845.   due to this fact.
  1846.  
  1847. * Rewrote TestPixel to take advantage of the equally spaced bitmaps but the
  1848.   timer is so lores that it doesn't show any speed increase. 8(
  1849.   It should be about 6x faster than ReadPixel now.
  1850.   Perhaps if I do a smake release then try timing it then I can get more
  1851.   accurate results.
  1852.  
  1853. * Upon noticing that the isLineOfSightTest really does only check the first
  1854.   4 bitplanes I changed TestPixel to work the same way and made another
  1855.   optimization as well. Saved about 20 cycles.  But I don't understand why
  1856.   it was only checking 4 bitplanes??  That means that all colors from 16 to
  1857.   31 are all "transparent" and don't block line of sight.  Do any game
  1858.   objects currently use colors 16 to 31???
  1859.   - SAI: No this code IS correct. Colours 16 to 31 are used and do block
  1860.     LOS.
  1861.   - JJC: Ok it all makes sense to me now.
  1862.  
  1863. * Once I looked at isLineOfSightTest I realized that I somehow COMPLETELY
  1864.   missed this routine before!  I just greatly optimized it.  It should be
  1865.   about 2x to 3x as fast as before.
  1866.  
  1867. * OK NOW AT LONG LAST, COMPUTER TREE-CASTING SHOULD BE ABOUT 3x as fast as
  1868.   before!!!!!!
  1869.  
  1870. * btw: You can verify that ReadPixel and TestPixel are in agreement by
  1871.   pressing the a key.  The b key measures the speed of ReadPixel and the
  1872.   c key measures the speed of TestPixel.
  1873.  
  1874.  
  1875.  
  1876. *** SPLIT SCREEN TECHNOLOGY UPGRADE ****************
  1877. Right now the WriteNearBottom text can go all the way to the edge and beyond
  1878. beyond so a hi-res screen will keep it from going off the edge.
  1879.  
  1880. * Implemented Split-Screen Technology.  Or in the present form it might be
  1881.   better referred to as Dual-Screen Technology.
  1882.  
  1883. I've wanted to do this since December 1996.  Well, actually I've wanted to
  1884. make a split-screen game since September 1985 when I first saw the Amiga's
  1885. HiRes mode.  Using dual screens allows the presentation of HiRes
  1886. sharp-looking text while also allowing the use of really cool finely
  1887. textured 64 color graphics on the A500.
  1888.  
  1889. I've seen so many games over the years that could have greatly benefitted
  1890. from using a split screen.  Every time I see a game that doesn't use one I
  1891. want to go into the program and MAKE it use one.  EVERY Amiga ever made
  1892. (even the original 1985 A1000) supports 640x200 resolution so there is
  1893. simply NO EXCUSE not to use it!  I want a game that makes use of my
  1894. computer's capabilities.
  1895.  
  1896. I don't mind large fonts, its just that I do mind _blocky_ fonts.  320x200
  1897. text just doesn't cut it for me.
  1898.  
  1899. * Changed WriteBottom and WriteNearBottom to work with the new system.
  1900.  
  1901. * I had to change the WriteBottom statement in braindrain.spl and nuke.spl
  1902.   to keep it coordinated.
  1903.  
  1904. * New function PutScreen which is easier to work with than MoveScreen.
  1905.  
  1906. * I am trying to keep the HiRes screen down to only 8 colors so I had to
  1907.   eliminate 3 colors from the CreatureInfo screen. 16 color HIRES is
  1908.   extremely slow.
  1909.   Color list from info.tex:
  1910.   GREEN1
  1911.   GREEN2
  1912.   BLUE1
  1913.   PINK
  1914.   RED3
  1915.   YELLOW
  1916.   CYAN
  1917.   BLACK
  1918.  
  1919.   WHITE  replaced with CYAN
  1920.   BROWN  replaced with PINK
  1921.   ORANGE replaced with BLUE1
  1922. * Translated the above pallete onto the HiResScreen.
  1923.  
  1924. * Translated SpellInfo Screens onto the HiResScreen.
  1925. * Translated Creature Info Screens onto the HiResScreen.
  1926. * Translated Game Loading/Saving onto the HiResScreen.
  1927.  
  1928. Now we just have to decide what we are going to do with all that extra
  1929. space.  Do we use bigger fonts?  Do we combine the 1st and 2nd screens
  1930. together?  ???
  1931.  
  1932. ***** END OF SPLIT SCREEN TECHNOLOGY UPGRADE *****
  1933.  
  1934.  
  1935. >* Subversion of a sleeping creature did not clear Sleeping Stat;
  1936. >  although the owner was correctly changed.
  1937.   Ok, I didn't realize that Subversion was supposed to wake creautures up.
  1938.   Now it does.
  1939.  
  1940. >* When a cloaked creature goes to sleep the cloak image disappears;
  1941. >  although the creature keeps the cloaked stat. That in itself is not a
  1942. >  problem; however, once woken the cloak image does not return.
  1943.  
  1944. Ok, I fixed it so a sleeping cloaked creature who is awakened will show up
  1945. graphically as a cloaked creature. Not tested due to problems with
  1946. makefile not rebuilding castmagic.c.
  1947.  
  1948.  * The sequence Cloak->Sleep->Wake produces a cloaked creature on
  1949.    your side, but although info fails on it, the animated graphic
  1950.    is visible!  This should now be fixed but someone needs to test it to be
  1951.    sure.
  1952.  
  1953.  
  1954. I haven't decided what to do about putting a cloaked creature to sleep.
  1955. How do you want that handled?  Do you want it to still appear graphically
  1956. cloaked or ?
  1957.  --SAI: Visible, one could assume that maintaining a clock requires effort
  1958.    therefore a sleeping creature doesn't maintain it.
  1959.  
  1960.  
  1961. >* Agents (Dao, Marid, etc.) look at the wrong player when testing for a
  1962. >   double or triple effect. I suspect this is another off by one effect.
  1963. >  (Should be easy to find this problem in AgentCast).
  1964.   JC is not attempting to fix this one due to never knowing whether to use
  1965.   Array[x] or Array[x-1] or Array[x+1].  Leaving this for SAI.
  1966.   --SAI NOW FIXED
  1967.  
  1968. BUG: smake newspell doesn't rebuild the file castmagic.c from the
  1969. individual .spl files.  It just ignores the new .spl files and uses the
  1970. same old castmagic.c file as before.
  1971. btw: I deleted castmagic.c and then did smake newspell but that didn't work
  1972. either.  It still didn't rebuild castmagic.c 
  1973.  
  1974. * I added the line "execute spellmanager" to the newspell: part of the
  1975.   lmkfile.  Hopefully that fixes everything relating to castmagic.c
  1976.  
  1977. * Fixed all warnings related to warp.tex
  1978.  
  1979. * BUG: Closing the FileRequester or selecting CANCEL does not actually
  1980.   cancel anything.  The game still loads/saves the game.  NOW FIXED.
  1981.  
  1982. * PROBLEM: Whenever the game stops the animation system for a legitimate
  1983.   reason the sprite also stops.  This results in jerky sprite animation
  1984.   on all Amigas.  On the A500 this is especially noticeable since the
  1985.   sprite spends most of its time in slow motion and jerking arouind in an
  1986.   icky manner.
  1987.   SOLUTION: I have Implemented the sprite animation as a vertical blank
  1988.   interrupt so it will ALWAYS be animated smoothly, regardless of
  1989.   ObtainSemaphore() or Forbid(). This makes playing the game on the A500 a
  1990.   zillion times better.  This should also allow the sprite to keep up with
  1991.   moving creatures better.
  1992.  
  1993. * I tried to implement the color cycling into the vblank interrupt but that
  1994.   just didn't work.  It turns out that beyond v36, LoadRGB4 and SetRGB4
  1995.   cannot be legally called from interrupts.
  1996.  
  1997. * Implemented new ChaosColorCycler Task which is responsible for all color
  1998.   cycling.  This allows color cycling to continue unabated even when the
  1999.   CHAOSANIM Task is prevented from running by an ObtainSemaphore.
  2000.  
  2001. * Implemented new method for seeing which stats are attacked by Combat,
  2002.   Ranged Combat and Special Combat.  Just click on Combat and the stats
  2003.   that it attacks will begin flashing. The old method was just never clear
  2004.   enough for me.  Hopefully this new method will make things more clear.
  2005.  
  2006. * Eliminated that 1 pixel of empty space from the top of the screen since
  2007.   screen real estate is at a premium.
  2008.  
  2009. * r=Range; s=Shoot; m=Move;
  2010.  
  2011. * Pressing the "r" key now shows the shooting range of the current
  2012.   creature by highlighting the cells that can be shot. Looks kewl!
  2013.   
  2014. * Pressing the "s" key now shows the cells that the current creature
  2015.   can shoot into (taking into account any LineOfSight requirements).
  2016.  
  2017. * Pressing the "m" key now shows the cells that the current creature can
  2018.   move into.
  2019.  
  2020. * BONUS: the new "r" and "s" and "m" routines use the asm SqDistance and
  2021.   TestPixel routines to provide superfast response!
  2022.  
  2023. * FLAW: computer controlled creatures can't shoot quite as far as human
  2024.   controlled creatures due to the fact that humans are given an extra .5 on
  2025.   their range while computer players are not.  I have now rewritten the
  2026.   range code such that all shooting ranges are calculated identically for
  2027.   humans, computers and the "r" and "s" keys.  NOW FIXED.
  2028.  
  2029. * When a creature is about to shoot, its actual .Range stat is printed at
  2030.   the bottom of the screen.
  2031.  
  2032. * PROBLEM: When deciding which spell to cast, the really cool
  2033.   auto-mouse-reporting feature that tells you what thing is under your
  2034.   mouse pointer is deactivated.  I've been wanting to keep this active
  2035.   during spell selection forever.  Now I finally did it!  YAY!
  2036.  
  2037. * The "r" and "s" and "m" keys now work on whatever cell the mousepointer
  2038.   is over at the time of the keypress!!! (Assuming there is no creature
  2039.   currently highlighted.)  YAHOO!  Now we can easily inspect the ranges and
  2040.   movement capabilities of any creature!!!!
  2041.  
  2042. * Now if you press SHIFT+r or SHIFT+s or SHIFT+m it displays the range info
  2043.   for the creature under the mousepointer _even_ if you have already
  2044.   clicked on a creature and that creature is highlighted by the sprite.
  2045.   This allows you to go around graphically inspecting the ranges of
  2046.   creatures right in the middle of moving one of your monsters!! Kewl!
  2047.  
  2048. * Put in some more code to support retargetable graphics.
  2049.  
  2050. * Implemented the new Highlighting method on Creations + Allies with
  2051.   numeric keys.
  2052.  
  2053. * Partially optimized HandleMOUSEMOVE();
  2054.  
  2055.   FLAW: The Hide spell is listed as a BONUS spell yet I keep getting them
  2056.   in my startup spell list. I frequently start a game with 2 of these
  2057.   spells showing.  I'm leaving this for SAI to fix as I don't know anything
  2058.   about the spell probability system.
  2059.  
  2060.  
  2061. Nov. 6th: sent complete archive to SAI so he can decide if he wants to make
  2062. a new version of the Chaos.font that is either 8 tall x 16 wide or 12x12 or
  2063. 8 tall x 12 wide; thus allowing the font to be smoother, larger and
  2064. (hopefully) easier to read.
  2065.  
  2066. --- Changes made by SAI ---
  2067.  
  2068. * Fixed the bug pertaining to the Dao, Marid etc.
  2069.  
  2070. My monitor is being a real pain on a day when I was hoping to fix lots of
  2071. little things. It worked for long enough to be impressed with the s, r,
  2072. m keys new info panels etc. I like them all. Now switching to my old 11"
  2073. monochrome screen.
  2074.  
  2075. * Implemented flying pointer.
  2076. * Fixed Invert slowness.
  2077. * Fixed Hide spell showing up on spell lists inappropriately
  2078.   (actually caused by Passage having rank 0 and prob 100)
  2079. * Gave Marid and Dao to more sensible probabilities.
  2080. * Added Edit option to first menu. It is just a stub at the moment
  2081.   so that I can work on it while you work on the main game.
  2082. * Added code to support a classic option
  2083.     - New global variable "classic"
  2084.     - New gadget on second SetUp screen to select mode
  2085.     - Changed io.tex to save "classic"
  2086.     - Change program to reload spell probs for each new game
  2087.     - Change Spell Manager to produce both chaos.prb and classic.prb
  2088.  
  2089. So far Faun is the only classic creature! I need to update the spell
  2090. files to show which are classic. NOW DONE.
  2091.  
  2092. * Fixed quickshot imagery
  2093. * Allowed reincarnation of creature even when mounted.
  2094.  
  2095. * Added new spells: Abath, Abduction, Acid Rain, Amphisbaena, Archery, Betrayal,
  2096.   Thundermare, Iridium Horse, Chaos Lord, Devastation, Disection, Hidden Horror,
  2097.   Mana Battery, Meddle, Necropotence, Points, Bipedal Generator.
  2098.  
  2099. I was amazed at how easy adding new spells is now. No more having to worry
  2100. about making sure I added all the appropriate pieces of information. All you
  2101. have to do is bang together a new spell file and change a couple of other
  2102. things. Once upon a time it would have taken a week to add this many new spells.
  2103. I've done it in four hours (I must admit I haven't tested them yet) and I
  2104. didn't yet complete the implementation of Necropotence. The new general combat
  2105. system is really cool for adding stuff as well.
  2106.  
  2107. JC you might want to check the descriptions of these new spells the are bound
  2108. to need tweaking. I haven't ad time to proof read them properly.
  2109.  
  2110. * Implemented the secret powerup Horse->Thundermare->Iridium.
  2111.  
  2112. * There was a bug in UpdateBoard that is not looking after wizard stats properly,
  2113.   I discovered this after implementing the ChaosLord spell.
  2114.  
  2115. * Moved powerup display hard left on info screen. I now think this might better
  2116. go on the line under the name line. Needed to move it left because some wizards
  2117. ad so much stuff it was going off the right of the screen. Also had to move it
  2118. up slightly.
  2119.  
  2120. * Set the Classic flag for all the appropriate spells. Also changed the game
  2121.   to start in "classic" mode by default.
  2122.  
  2123. * Allegedly fixed a problem that was causing the game to hang on Quit.
  2124.  
  2125. * Modified the I/O routines to save the entire probability table with a saved
  2126.   game. NOW TESTED, all seems to work.
  2127.  
  2128. * Added tex2c.c to archive. Actually this is a tool I have used on lots
  2129.   of projects and originally I had visions of making it a farily powerful
  2130.   thing, but that never eventuated.
  2131.  
  2132. Doing one last rebuild to test and then sending archive.
  2133.  
  2134. SAI -- ReleaseS
  2135. JJC -- ObtainS   Begin Version 2.0
  2136.  
  2137. * Played 1 small test game to get a Thundermare and an Iridium Horse.
  2138.   Awesome!
  2139.  
  2140. * Made minor changes to most of the new spell descriptions: Abath, Abduction,
  2141.   Acid Rain, Amphisbaena, Archery, Betrayal, Thundermare, Iridium Horse,
  2142.   Chaos Lord, Devastation, Disection, Hidden Horror, Mana Battery, Meddle,
  2143.   Necropotence, Points, Bipedal Generator.
  2144.  
  2145. Are independent creatures really attracted toward Mana Batteries?
  2146.  
  2147. My fave new spells are ThunderMare, Iridium Horse, Chaos Lord and Archery
  2148. (hey you stole my spell!).  I rather liked many of the new spell
  2149. descriptions; one or 2 of them made me crack up laughing and most were just
  2150. plain interesting to read.
  2151.  
  2152. * 1 bug in DoComputerCast removed.
  2153.  
  2154. * I could find no evidence in the casting code of Depth removing LOS
  2155.   requirements so I changed the description of Depth accordingly.
  2156.  
  2157. * For humans, Depth only worked on spells > ImpID yet for computer wizards
  2158.   Depth just plain worked for everything. I adjusted it to be >ImpID for
  2159.   everyone.
  2160.  
  2161. * DoComputerCast never checks the CAST_GROWTH bit.  This explains why they
  2162.   cast weird spells on growths.  They were cheating!
  2163.  
  2164. * DoComputerCast never checks for the presence of an Arborist spell.  Poor
  2165.   guys.  They could NEVER put 2 trees next to each other.
  2166.  
  2167. * That's a total of 4 discrepancies between DoCast and DoComputerCast.  I
  2168.   fixed all this by writing a new "Grand Unified Spellcasting Rules Function"
  2169.   that DoCast and DoComputerCast and the "c" key all use to determine if a
  2170.   postulated cell/spell/wizard combination would be legal or not.  This
  2171.   should help to eliminate lots of bugs in the future.  From now on, all
  2172.   spellcasting rules just go one place ObeySpellCastingRules.  This ensures
  2173.   that both computer wizards and human wizards and agents all follow the
  2174.   exact same set of rules.
  2175.  
  2176. I noticed this line in the cast.tex:
  2177. HighLightCell = (WORD)cell; /* first to give some time to catch up */
  2178.  
  2179. btw if you ever want to make _sure_ that the sprite has caught up then you
  2180. can just do a WaitVblank(1);
  2181.  
  2182. I've never done that because I didn't want to slow down the game with a
  2183. bunch of Waits.  And anyway now that I redid the sprite animation as a
  2184. vblank interrupt it is now IMPOSSIBLE for an ObtainSemaphore to stop the
  2185. sprite from being redrawn at the correct position for long periods of time.
  2186. So the maximum length of time to catch up is 1/50th of a second.
  2187.  
  2188. * c = casting.  During the spellcasting phase you can press c and all the
  2189.   legal targets for your spell are highlighted in the color cycling color.
  2190.   This can be useful in the regular game as well as for testing the
  2191.   spellcasting rules.
  2192.  
  2193. * q = query = question mark to bring up info screens.
  2194.  
  2195. Hey this is sort of cool, driving around the screen with the mouse in one
  2196. hand and the keyboard in the other.  It is now very quick and easy to zip
  2197. around with the mouse and press q to see the info screens.  q,s,r and c are
  2198. all on the left hand side of the keyboard.  Only m is on the right hand
  2199. side, so your left hand can sit on the keyboard and your right hand on the
  2200. mouse.  Maybe we should have a=m=move because a is on the left hand side of
  2201. the keyboard... but a should really be attack so I dunno...
  2202.  
  2203. * Added new subsection to the docs {Keys}  Plus other small improvements.
  2204.  
  2205. *********************************************************************
  2206. Mini Level Editor Upgrade:
  2207. * ALT + d = Delete
  2208. * ALT + c = Copy
  2209. * ALT + p = Paste
  2210. * ALT + o = Object (This lets you pick any object from the game and place
  2211.                     it anywhere you like!)
  2212.   This works with a hierarchical menu system which allows you to find
  2213.   the creature you are looking for according to how you think of it.
  2214.  
  2215.   Click the Orc to get a list of all ground creatures.
  2216.   Click the dead Orc to get a list of all dead ground creatures.
  2217.   Click the Orc scroll to get a list of all ground creature scrolls.
  2218.   Click the Skeleton to get a list of all undead ground creatures.
  2219.   Click the Skeleton Scroll to get a list all undead ground creature scrolls.
  2220.  
  2221.   Click the Harpy to get a list of all flying creatures.
  2222.   Click the dead Harpy to get a list all dead flying creatures.
  2223.   Click the Harpy Scroll to get a list all all flying creature scrolls.
  2224.  
  2225.   Click the Ghost to get a list of all Undead Flying creatures.
  2226.   Click the Ghost Scroll for a list of all Undead Flying creature Scrolls.
  2227.  
  2228.   Click the Wall for a list of all inanimate objects.
  2229.   Click the Wall Scroll for a list of all inanimate object scrolls.
  2230.  
  2231.   Click the GooeyBlob for a list of all Growths.
  2232.   Click the GooeyBlob Scroll for a list of all Growth Scrolls.
  2233.  
  2234.   Click the Horse for a list all Mounts and Meditations.
  2235.   Click the Horse Scroll for a list all Mounts and Meditations Scrolls.
  2236.  
  2237.   Click the Green Dragon for a list of all Level2 Mounts.
  2238.   Click the Green Dragon Scroll for a list of all Level2 Mount Scrolls.
  2239.  
  2240.   Click the Wood Elf for a list of all Archers.
  2241.   Click the Wood Elf Scroll for a list of all Archer Scrolls.
  2242.  
  2243.   Click the Bolter Wall for a list of all things that can shoot.
  2244.   Click the Bolter Wall Scroll for a list of Scrolls for things that can shoot.
  2245.  
  2246.   Click on the Armour for a list of all Magic Spells. ( > ExitID)
  2247.  
  2248.   After you click on the actual object that you want then just click on the
  2249.   board where you want it and *poof* it will appear there.  It will also be
  2250.   in your copybuffer so you can paste successive copies with ALT + p.
  2251.  
  2252. These keys require ALT for now so that people who aren't supposed to know
  2253. about them won't.  Unfortunately, having to press 2 keys to do something is
  2254. not user friendly so we either need "Edit Mode" or gadgets that do the same
  2255. things as these keys.
  2256. These are very simple and don't have any special code for handling wizards
  2257. or the lists associated with list agents.  Nevertheless it is possible to
  2258. edit levels with these commands.  And since they are all #ifdef'ed they
  2259. take up about 0 bytes in the smake release.
  2260.  
  2261. * Lots of new predicates all #defined in predicate.tex which work with
  2262.   object ID's instead of cells.
  2263.   All new predicates are thus far used only in the level editor code:
  2264.   isIDinanimate(id)
  2265.   isIDgrowth(id)
  2266.   isIDundead(id)
  2267.   isIDflying(id)
  2268.   isIDmount (id)
  2269.   isIDdragon(id)
  2270.   isIDarcher(id)
  2271.   isIDshooter(id)
  2272.  
  2273. **********************************************************************
  2274.  
  2275.  
  2276. Azers don't heal even though they have a 2 recovery rate.  I see you have
  2277. rewritten the recovery code so I'll just leave this for you to fix.
  2278.  
  2279. * Added the bar graphs of the recovery rates to the information panel.
  2280.  
  2281. * Columnarized the stats on the 2nd info screen so SAI will have room to
  2282.   implement his "Creatures Killed" stuff. In my notes I called it
  2283.   "Foes Vanquished"
  2284.  
  2285. * Weird graphic glitch:  Clicking on the word combat causes a rectangular
  2286.   black spot at the top of the screen where the title bar is supposed to be.
  2287.   This partially overwrites the powerup icons.
  2288.   I have determined that anytime you click the mouse into a window which is
  2289.   not currently active that the lores screen gets this black spot but ONLY
  2290.   when there is a nonbackdrop window in that area.  The NewGame window has the
  2291.   same problem when you click the mouse into the bottom of the screen (the
  2292.   hires screen).  Do you know of some way to disable the OS from redrawing the
  2293.   TitleBar every time the user clicks a new window?
  2294.  
  2295.   Are you getting this same glitch on your OS?
  2296.  
  2297.   The only way I know to eliminate this problem is to just ALWAYS use the
  2298.   backdrop window for everything. This is something I have been planning to
  2299.   do for a long time anyway to save chipram.
  2300.  
  2301.   As a quick and reliable fix (only works on the info screen) I have simply
  2302.   activated the hires screen FIRST before anything gets drawn.
  2303.   I also had to remove the autoACTIVATE bit from the newwindow structure.
  2304.   This way when the user Clicks on Combat he isn't changing windows so the
  2305.   titlebar doesn't get redrawn.
  2306.  
  2307. * Fixed that annoying problem where an independent creature could move next
  2308.   to one of your creatures and attack it while the highlight sprite didn't
  2309.   bother to highlight the creature in its new cell until AFTER the attack
  2310.   was complete and even then it was instantly turned off.  This was caused
  2311.   by the complete lack of HighLighting code in cMoveNonEngaged.  NOW FIXED.
  2312.   The sprite now appears to keep up much better.
  2313.  
  2314. * BUG: SpellInformation(); on a WebAID, WebBID, WebCID, WebDID, VWallID,
  2315. HWallID, ExitID causes the game to NOT print the spell description for that
  2316. spell and it crashes the computer.  I don't know how the compressed pooled
  2317. descriptions work or how HIDDEN spells are supposed to work so I just leave
  2318. this for you to fix. NOW FIXED
  2319.  
  2320. BUG: I have a bat with 0 life and -4 recovery but it isn't dying.
  2321. SAI: I failed to replicate this problems. I had an azer in the same situation
  2322. and it did die.
  2323.  
  2324. * BUG: The computer seems to think that player 2 and DEADP are on the same
  2325.   team. It looked very strange when I pressed "2" and all the dead things
  2326.   on the screen lit up in BLUE.  NOW FIXED.
  2327.  
  2328. * YIPERS!  Team[] was only big enough for the 8 players plus asleep.
  2329.   Accessing Team[DEADP] was a bad subscript error.  NOW FIXED.
  2330.  
  2331. * FLAW: ChaosLord did not set the FLYING_STAT bit of the wizard. NOW FIXED.
  2332.  
  2333. * Replaced 3 old slow codes in init.tex with faster GetCell(x,y).
  2334.  
  2335.  
  2336. **************************************************
  2337. ********** MAJOR NEW GAMEPLAY MECHANIC ***********
  2338. **********          SCROLLS            ***********
  2339. **************************************************
  2340.  
  2341. Read the docs for a complete explanation of scrolls.
  2342.  
  2343. Scrolls add the following Play-Mechanics to the game:
  2344.  
  2345. 1) The "Collect Things" Play-Mechanic.
  2346.    Sometimes it is just plain fun to collect things and add them to your
  2347.    colletion. This applies to both games and real life.
  2348.  
  2349. 2) The "Limited Resources so you better get moving and grab them while you
  2350.    can!" Play-Mechanic.
  2351.  
  2352. 3) To some extent it adds the "Colonization" Play-Mechanic because you want
  2353.    to hurry up and grab as many scrolls as you can early in the game
  2354.    rather than just sitting in a tree meditating.
  2355.  
  2356.    I have played many games where I initially hopped into a meditation and
  2357.    then just cast powerups on myself to avoid confrontation.  In the exact
  2358.    same situation with Scrolls added I would have to rethink my strategy.
  2359.    I might make a mad dash for an important spell and get drawn into a
  2360.    fierce battle as a result.
  2361.  
  2362. btw: Scrolls make being player 7 or 8 more advantageous.
  2363.  
  2364. All in all Scrolls make a powerful additional option for an already superb
  2365. game.  There are now some intriguing new ways to play the game.  Like start
  2366. with 0 or 1 spells but 99 Scrolls with you against 3 enemy wizards and 1
  2367. generator.  It makes the game take on a whole new flavor.
  2368.  
  2369. BTW: If we don't get the level editor fully functional for a while now it
  2370. is no big deal.  You can just play the game with 99 Scrolls and between
  2371. those 99 spells + the 20 in your spell list you'll probably have the spells
  2372. you want to test available to you.
  2373.  
  2374.  
  2375. * There was something in the code whereby if you were obtaining a new
  2376.   spell but your SpellTable up to the number of Spells you started with
  2377.   was full then you didn't get your spell.  I changed this by replacing
  2378.   "Spells" with "MAX_SPELLS" in AddGUISpell so that way if you start the
  2379.   game with 10 spells and cast 2 of them and then get 8 new spells you now
  2380.   REALLY get them instead of most of them being "lost".  I also changed
  2381.   SpellTable to hold up to 150 spells instead of just 100.  Even
  2382.   though the largest number of spells that you can _start_out_with_ is 99.
  2383.  
  2384. * New Predicate isScroll(cell)
  2385. * New Function InsertScroll(cell)
  2386. * New Function InsertCorpse(cell)
  2387.  
  2388. **** Bug report + Fix *********************************************
  2389.  
  2390. * I was having a serious bug where scrolls with an ID > RevealID were being
  2391.   inserted into cells.  This caused enforcer hits and lots of crashes.
  2392.  
  2393.   Here was the guilty code:
  2394.        if (z==0) z=(MSGRandom() % (ExitID-1))+1;
  2395.        else
  2396.        z=(MSGRandom() % (RevealID-ExitID)) + ExitID+1;
  2397.  
  2398. It took me a while to figure this out... I looked at it several times and
  2399. my math seem to be ok yet IDs greater than RevealID were being generated
  2400. by this code.
  2401.  
  2402. The problem turned out to be that RevealID is not a simple number but a
  2403. "complex constant".  It is a large mathematical expression, actually.
  2404.  
  2405. RevealID works out to CloakID + 1
  2406. CloakID  works out to BuryID + 1
  2407. BuryID   is MagicSheildID + 1
  2408. MagicShieldID is OrcsID + 1
  2409. ad nauseum
  2410.  
  2411. Rule: NEVER USE IDs in anything but simple expressions without
  2412.       enclosing each ID in parenthesis.
  2413. This is one of the drawbacks to using #defined expressions instead of
  2414. variables.
  2415.  
  2416. FIXED BY: Enclosing RevealID and ExitID in parenthesis. (RevealID) (ExitID)
  2417.  
  2418. Maybe we should enclose all #defines in parenthesis in their definition?
  2419. SAI: The best solution would be to replace all the #defines by an
  2420. enumeration. It would probably lead to faster compilation. However, since
  2421. the Spell Manager now depends on the #define list several modifications
  2422. would be necessary.
  2423. JC: I think if we just enclose each #define in () that will suffice.
  2424. **** End Bug Report + Fix *********************************************
  2425.  
  2426.  
  2427. ***************************************************
  2428. *********     END OF SCROLLS UPGRADE    ***********
  2429. ***************************************************
  2430.  
  2431. Played a test game and teams work fine for the number keys but for
  2432. spellcasting they are totally screwed up.  All the computer wizards were
  2433. casting spells on computer wizards who were not on their team and on human
  2434. wizards who were not on their team.  I sure hope SAI can figure this out. NOW FIXED
  2435.  
  2436. ----
  2437. ObtainS by SAI
  2438.  
  2439. Survived potential heart-attack seeing the archive named "encryptedchaos".
  2440. I have always (well not always, but for a long time) wanted something like
  2441. scrolls. Full points for actually having the guts to implement it. I can't
  2442. wait for it to compile so I can try it! I will also investigate your edit
  2443. functions and then try and amalgamate the two editing systems.
  2444.  
  2445. Have noted the above unsolved bug reports and will attempt to resolve them.
  2446.  
  2447. BUG: Press ALT-o part way through a previous ALT-o and I couldn't get
  2448. back to the game.
  2449.  
  2450. * BUG: Program lets you select growths to move. NOW FIXED.
  2451.  
  2452. BUG: New game followed by quit (sometimes) fails to terminate. I think this
  2453.   occurs because if ObtainSemaphore has been done the Animator tasks fails
  2454.   to terminate as expected. This suggests there is something wrong with how
  2455.   the menu system is using ObtainSemaphore, but I have been unable to trace
  2456.   this fault.
  2457.  
  2458. * Fixed MassMorph to not destroy bipedal generators.
  2459. * Made independent attract to Mana Battery.
  2460. * Fixed problem of info of spells without description.
  2461. * Made minor changes to game docs.
  2462. * Made a slight change to the testing of spells during scroll insertion.
  2463.  
  2464. * Identified the cause of the Team bug. It is a simple problem with the
  2465.   spell manager writing assist.h.
  2466.  
  2467. * Added my editor into the source code, will try to amalgamate with JC
  2468.   mini-editor code. Suggestion: to make it harder to accidently discover
  2469.   ALT-o etc. suggest the user have to type ALT-! before these special
  2470.   key-presses will work.
  2471.  
  2472.   JC: I'm not even sure we should have those keypresses in the game at all.
  2473.   I just DEFINITELY wanted something that I could use quickly to test things
  2474.   with right then at that moment.
  2475.   I just threw all that code together in 1 day because it just hit
  2476.   me how I wanted to do it.  It is a miracle that it worked.  After I sent
  2477.   you the archive I tested the editing stuff and was quite pleased that it
  2478.   actually worked!!
  2479.  
  2480. * Started implementation of foes vanquished. Discovered this would mean
  2481.   lots of changes to move.tex. To ensure I make these changes properly
  2482.   I'm going to careful go through printouts of this module and also
  2483.   cmove.tex. Some spell handler may also need to be changed, but I will
  2484.   ignore that temporarily.
  2485.  
  2486. SUGGESTION: Have an option for scrolls where you cannot see in advance
  2487. what you scroll will be.
  2488.  
  2489. * Added Wizards variant of wizards and made changes in move.tex. This saved
  2490.   28K.
  2491.  
  2492. * Modified editor to work with scrolls.
  2493.  
  2494. * Made minor modifications to InsertScroll.
  2495.  
  2496. * Put some common cell manipulation routines in a new module core.tex.
  2497.   Reinstate, Insert*, PutToSleep, ClearUnder, WakeUp.
  2498.  
  2499. * Moved WizardExplode effect into cell.tex.
  2500.  
  2501. * Added an isGenerator predicate.
  2502.  
  2503. * Added scrolls docs to user docs. Didn't do it very well however.
  2504.  
  2505. * Combined the JC mini-editor commands (except ALT-o) with my editor.
  2506.   x is a synonym for d, v is a synonym for p. The the three keys
  2507.   "XCV" now do cut, copy, paste as is typical in many applications.
  2508.   In the mini-editor ALT must be pressed, in the general editor ALT
  2509.   is unnecessary. These key presses still have major flaws when applied
  2510.   to wizards, but they are a good start.
  2511.  
  2512. * Modified InsertCorpse to insert a nothing when passed an argument not
  2513.   having a dead image. This makes sense, and is now necessary since 
  2514.   InsertCorpse is now called from several places.
  2515.  
  2516. * BUG: I have now comfirmed that TestPixel does not seem to work properly
  2517. in Spunge. I replaced TestPixel with ReadPixel and the problem went away.
  2518. Earlier explanation: The graphic effect used with Dark Power no longer seems to work properly
  2519. only works for the lowest 4 bits of each cell. NOW FIXED
  2520.  
  2521. * Fixed Abduction and Raise Dead (for some reason Raise Dead was leaving the
  2522.   corpse underneath). Actually I think that means the corpse was already
  2523.   there which means there is something else wrong as well.
  2524.  
  2525. * Vanquished foes now working including saving of this information. However, I
  2526.   am not at all convinced that memory is been released properly in all cases
  2527.   when an object dies, e.g. when a creature falls in a pit. Also when a spell
  2528.   like Replicate is used, this replicates the vanquished list for that creature
  2529.   as well (not quite, both creatures end up using the same list--since this is
  2530.   rather neat I haven't changed it).
  2531.  
  2532. * Implemented a bomb explosion effect. It is now used for Nuke and the Goblin
  2533.   Bomb.
  2534.  
  2535. * Fixed the recovery rate code. I did however notice a python that refused to
  2536.   died (this may be related to the pox or maybe it had been powered up in some
  2537.   way, I'm not worrying about it unless I see it again).
  2538.  
  2539. * Removed another bug from io.tex (a bad bug).
  2540.  
  2541. QUERY: Should scrolls be generated according to their probabilities.
  2542. Current all spells are equally likely under scrolls and hence powerful
  2543. spells are relatively common. I'm not saying this is bad, but is it
  2544. what you intended?
  2545.  
  2546. Well, it is what I intended for the moment.  I just wanted to try something
  2547. different.  Since I had only played the game with 2 sets of probabilities
  2548. (regular and classic) I thought I'd try yet another set of probabilities
  2549. just to see how it worked out.  I played some test games and it seemed ok
  2550. the way it is as long as you play with a small number of scrolls, say
  2551. 20 or less.  But with 99 scrolls there are multiple Touch of God and
  2552. Iridium Horse scrolls laying around which I didn't think was the best
  2553. thing, however I have a nifty fix for this which I will hopefully implement
  2554. this week.  Then we can playtest it some more and make a final decision
  2555. on the scroll-probability system later.  I have many things to do with
  2556. the scrolls concept this week.
  2557.  
  2558. --- End SAI changes ---
  2559.  
  2560. --- JJC ObtainSemaphore ---  Begin Version 2.1
  2561.  
  2562. ************** BEGIN tex2c speed upgrade ****************
  2563.  
  2564. * Installed new tex2c.c into the archive.  Be sure to compile it
  2565.   according to the instructions contained in the source.
  2566.   Or hopefully I'll just Email it to you if I can.
  2567.   Be sure to replace the old version with the new one in your command
  2568.   path or you won't benefit from the speed increase.
  2569.  
  2570.   tex2c: Filesize reduced from 12672 -> 9768 bytes.
  2571.   tex2c: Speed increase on prog.tex: 35x faster (from RAM:)
  2572.   tex2c: Time savings on prog.tex: 67 seconds. (From HardDrive)
  2573.   tex2c: Time savings on complete make: 317 seconds (5 minutes, 17 seconds)
  2574.          (From HardDrive)
  2575.  
  2576.   All times were measured on Chaos_2.0 source files.
  2577.  
  2578.   tex2c: Now works as tex2c filename rather than tex2c <filename.
  2579.   tex2c: All output files are identical with the old tex2c.
  2580.   tex2c: No assembly language used in order to help preserve
  2581.          multiplatform compatability.
  2582.  
  2583.   tex2c: Read source code for more detailed timing tests and exact
  2584.          description of changes made.
  2585.  
  2586. ************* END tex2c speed upgrade *******************
  2587.  
  2588. * Replaced code segments with ClearUnder in 4 spell files.
  2589. * Replaced several code segments in .tex files with ClearUnder.
  2590. * All appropriate code segments have been replaced with ClearUnder now.
  2591.  
  2592. * Ok, now I did "smake newspell" and the filesize INCREASED from
  2593.   1552980 to 1628116!!!!!  There must be some difference between smake dev
  2594.   and smake newspell.
  2595.  
  2596. * Replaced all appropriate code sequences with ClearVisbile
  2597.  
  2598. * I could not find any code sequences to replace with RestoreCell.
  2599.  
  2600. * Replaced all appropriate code sequences with BackUp.
  2601.  
  2602. * Above replacements were made to enhance readability and to make future
  2603.   enhancements easier.  Some future strange enhancemnt to the cell
  2604.   structure can now be integrated into the game by just changing the
  2605.   routines in core.tex. (theoretically).
  2606.  
  2607. * BUG: Wizard kills some creatures.  Wizard mounts something.  Mount dies
  2608.   permanently.  Wizard's vanquished foes info not copied into
  2609.   cell.vanquished.  FIXED by replacing a code sequence with
  2610.   RestoreCellWizard in Reinstate.
  2611.  
  2612. * BUG: same as above but with collapsing meditations.  FIXED by inserting
  2613.   RestoreCellWizard into CollapseMeditation.
  2614.  
  2615. * BUG: Collapsing mediations does RestoreCellWizard on the wrong wizard,
  2616.   with disasterous consequences. (another off by 1 error).  FIXED.
  2617.  
  2618. * All appropriate code sequences replaced with RestoreCellWizard.
  2619.  
  2620. * I could not find any code sequences to replace with BackUpCellWizard.
  2621.  
  2622. * Inserted version information compatible with the AmigaDOS version command.
  2623.  
  2624. * Fixed the smake archive to archive the time and datestamp of the files.
  2625.   This way I can cd to the graphics or spells directory and type:
  2626.   list since friday
  2627.   to see all the files that have been changed since last friday.
  2628.   Or I can do:
  2629.   list since 25-nov-97
  2630.   to see all the files that you have added/changed since November 25th.
  2631.  
  2632. * Fixed the bug with pressing alt-o while already in the alt-o menu.
  2633.  
  2634. **************************************************************************
  2635. ************************ ARTIFACTS UPGRADE *******************************
  2636. **************************************************************************
  2637.  
  2638. * Read the docs for complete instructions on Artifacts.
  2639.  
  2640. * New function:  InsertArtifact.
  2641. * New predicate: isArtifact.
  2642. * New predicate: isUnderArtifact.
  2643. * New predicate: isUnderScroll.
  2644. * New predicate: isIDstatic.
  2645.  
  2646. * Artifacts added to alt-o level editor.
  2647.  
  2648. * Hidden Artifacts implemented.
  2649.  
  2650. * Now that I have implemented hidden artifacts and scrolls I find that I
  2651.   cannot attack objects that belong to NOBODY.  I'm not fixing this right
  2652.   away so that I can play the game like this for a while and see what it is
  2653.   like.  The game does let me shoot objects belonging to NOBODY though.
  2654.   NOW FIXED.
  2655.  
  2656. * Made numerous changes to Reinstate so that killing any object that is
  2657.   covering a scroll or artifact does NOT destroy the scroll/artifact.
  2658.   This mainly consisted of replacing InsertCreature/ClearUnder sequences
  2659.   with RestoreCell/InsertCreature sequences.  btw: I REALLY like the new
  2660.   reinstate routine it is sooo much easier to understand than the old one!
  2661.  
  2662. * Also had to make changes to InsertCorpse to not destroy scrolls and
  2663.   artifacts.
  2664.  
  2665. * New functions to support the above 2 items: InsertCreatureUnder and
  2666.   InsertCorpseUnder.
  2667.  
  2668. In general, if a creature dies while on top of a scroll then the corpse
  2669. for the creature goes to the underpart and the scroll goes to the top part.
  2670.  
  2671. If an inanimate object dies which is covering a scroll or artifact then
  2672. the scroll/artifact is no longer destroyed but instead goes to the visible
  2673. part of the cell.
  2674.  
  2675. * Hidden scrolls and artifacts are now fully supported by core.tex.
  2676.   You can now "dig up" buried scrolls and artifacts.
  2677.   You can now have wars over a particular scroll, with one creature
  2678.   moving onto the cell and being killed by another creature who is then
  2679.   killed by yet another, ad infinitum and the scroll won't be destroyed.
  2680.  
  2681. * Made 2 fixes to move.tex to prevent Thundermare and Iridium
  2682.   transformations from destroying scrolls underfoot.
  2683.  
  2684. * Set CAST_ARTIFACT on all appropriate magic spell files.  At the moment
  2685.   CAST_ARTIFACT is set only on spells that have CAST_LIVING set.  All
  2686.   spells which have CAST_LIVING set also have CAST_ARTIFACT set.
  2687.   This way artifact creatures are treated just like any other creature
  2688.   for purposes of spell-casting.
  2689.  
  2690. * Please don't forget to set CAST_ARTIFACT on any new magic spells that you
  2691.   make (if needed).  Most every spell that can be cast on creatures should
  2692.   be castable on Artifacts also. (since artifacts are just a special type
  2693.   of creature, like undeads are a special type of creature.)
  2694.  
  2695. As I was going through the spell files I noticed that Orcs is CAST_FREE?
  2696. And when you actually cast an Orcs spell it says at the bottom that the
  2697. range is 0 but in fact it is 1.
  2698.  
  2699.  
  2700. I added Artifacts to the game for the following primary reasons:
  2701. 1) It adds the "Capturing Neutral Equipment" play-mechanic to the game.
  2702. 2) It adds the "Capturing Enemy Installations" play-mechanic to the game.
  2703. 3) Provides extra incentive to players to hold a particular position, as
  2704.    opposed to hiding in the corner.
  2705.  
  2706. How good artifact gameplay actually is in real games will have to be
  2707. determined by playtesting.  Although I note that when I added scrolls I
  2708. began doing crazy things that I wouldn't have otherwise done, such as
  2709. charging my wizard TOWARDS powerful enemy creatures (instead of AWAY as
  2710. usual) in order to grab a good scroll before they could get it.
  2711.  
  2712. **************************************************************************
  2713. ********************** END ARTIFACTS UPGRADE *****************************
  2714. **************************************************************************
  2715.  
  2716. I just started up a test game to test all the new features and I started
  2717. out the game with a THUNDERMARE in my spell list.
  2718.  
  2719. A bipedal generator just generated a Brown Bear.  But bears are quadrupeds
  2720. not bipeds.  Shouldn't this be fixed?
  2721.  
  2722. Hmmm... Now I am playing a game with 4 generators... 2 of them are bipedal
  2723. generators.  Bipedal Generator1 produced this sequence of monsters:
  2724. Derro, Derro, Bear, Bear.
  2725. Bipedal Generator2 produced this sequence of monsters: Halfling, Halfling,
  2726. Halfling, Halfling
  2727.  
  2728. *************** Scrolls Improvement Upgrade ****************
  2729.  
  2730. * Hidden Scrolls implemented.
  2731.  
  2732. * Inanimate objects can no longer pick up scrolls.
  2733.  
  2734. * Fixed spiders to use the InsertCreatureUnder function when laying webs.
  2735.  
  2736. * Changed spider description to say that it eats scrolls. (since the
  2737.   act of laying a web destroys any scroll that may have been underneath it.)
  2738.  
  2739. * REMOVED the ChooseYourBonusSpell option from the setup screen II and just
  2740.   set it to always be on.  IMHO having it off is no fun so it should just
  2741.   always be on. (and we've completely run out of room on setup screen II).
  2742.  
  2743. * Scroll delay implemented.  So now it is _very_ possible to have wars over
  2744.   scrolls.  You can set the scroll delay to 3 turns and then you must take
  2745.   the cell and HOLD it for 3 turns straight.  If someone dislodges you from
  2746.   the cell before 3 turns is up then you don't get the scroll and must retake
  2747.   it and start over.
  2748.  
  2749. BUG: Ropers destroy whatever they are standing on when teleporting.
  2750. (corpses/scrolls/artifacts)  Oops no it doesn't.  When the roper teleports
  2751. it takes whatever it is standing on with it.  Interesting.
  2752.  
  2753. * BUGS: Roper scrolls teleport, growth scrolls alter growth rates, Spider
  2754.   scrolls lay webs, Haunt scrolls change sides, meditation scrolls
  2755.   collapse, spriggan scrolls "take a kip".  ALL FIXED NOW.
  2756.   These bugs wouldn't have happened if scrolls were "dead".  But perhaps
  2757.   setting the deadbit on scrolls would cause other bugs?  Who knows?
  2758.   For now I have simply added an isScroll check to wherever I find bugs
  2759.   related to scrolls.  It is easy and it works.
  2760.   
  2761. ************** End Scrolls Improvement Upgrade **************
  2762.  
  2763.  
  2764. * Replaced a couple of the old wizards[] references with Wizards[] in
  2765.   core.tex.
  2766.  
  2767. * Replaced a couple of the old wizards[] references with Wizards[] in
  2768.   cell.tex.
  2769.  
  2770. * Replaced several of the old wizards[] references with Wizards[] in
  2771.   warp.tex.
  2772.  
  2773. * Replaced all wizards[] with Wizards[] in init.tex.
  2774.  
  2775. * core.tex, cell.tex, warp.tex, init.tex are now completely free of old
  2776.   wizards[] references.
  2777.  
  2778. * Replaced all (except 1) of the old wizards[] references in predicate.tex.
  2779.  
  2780. * Replaced 2 of the old wizards[] references with Wizards[] in prog.tex.
  2781.  
  2782.  
  2783. ***********************************************************************
  2784. ********** Artificial Intelligence Spell Selection Upgrade ************
  2785. ***********************************************************************
  2786.  
  2787. * I am seriously looking at spell.tex for the very first time.
  2788.  
  2789. * Improved computer spell selection by using ObeySpellCastingRules.
  2790.   This should completely eliminate all the really stupid casts where the
  2791.   wizard tries to cast an impossible spell due to there not being any legal
  2792.   targets. (Such as casting Raise Dead when there are NO corpses in range.)
  2793.  
  2794. * BUGS: Computer wizards were cheating!  They were going through their
  2795.   ENTIRE spell list and casting any spell they wanted!  And they were going
  2796.   through their entire spell list and discarding any spell they wanted!
  2797.   NOW FIXED BY changing max to min in the following line in
  2798.   IntelligentComputerSpellSelect and ComputerSpellDiscard.
  2799.  
  2800.   int look = max (LOOKAHEAD, Spells);
  2801.  
  2802. * ObeySpellCastingRules is now more sensibly known as isIllegalCast.
  2803.  
  2804. * New function: isStupidCast.
  2805.  
  2806. * Improved computer spell selection by using isStupidCast along with
  2807.   isIllegalCast.  Now if a wizard contemplates casting combat but his only
  2808.   legal targets are enemy creatures or his own combat aerial servant he
  2809.   will simply decide that casting combat in this situation would be stupid
  2810.   and will cast something else instead.
  2811.  
  2812. * ADDED lots of extra checks for spells to probably not cast while double
  2813.   or triple is in effect.
  2814.  
  2815. * ADDED complete stupidity checking regarding multiple wizard powerups.
  2816.  
  2817. * Having a working game load/save feature really helped me debug the AI the
  2818.   last few days.  Thanks Sean!
  2819.  
  2820. * FLAW: A computer wizard was in a tree.  There were several legal targets
  2821.   for the slow spell that he cast but unfortunately, all the targets were
  2822.   already speed 1 so the spell was really wasted. NOW FIXED.
  2823.  
  2824. * SMALL FLAW: A computer wizard in a Dark Citadel just cast Speed on his
  2825.   Floating Eye.  I'm sure he had at least a few other spells that would
  2826.   have been better.  NOW FIXED.
  2827.  
  2828. * FLAW: A computer wizard cast Sanctuary on himself even though he
  2829.   already had Recover Boost.  (He had no creatures on the board).  He
  2830.   should have cast any one of a number of other better spells.  NOW FIXED.
  2831.  
  2832. * Numerous other flawed spell selections fixed using the same method as
  2833.   above.  This new "look before you cast" strategy is really working out
  2834.   nicely!  The only strategy game that might be better than Chaos is
  2835.   Chaos Coding.
  2836.  
  2837. If you notice a computer wizard casting a spell and then aborting it due to
  2838. no legal/nonstupid targets then please let me know. (or just fix it).  It
  2839. should NEVER happen unless the creature he was planning to cast it on gets
  2840. killed before his casting phase.  Or if his line of sight becomes blocked
  2841. (for example by another wizard casting lots of walls between him and the
  2842. intendend target.)
  2843.  
  2844. ***********************************************************************
  2845. ******* END Artificial Intelligence Spell Selection Upgrade ***********
  2846. ***********************************************************************
  2847.  
  2848. BUG:  I just surrounded a computer wizard with weak walls.
  2849. (He had already selected Lightning as his spell).  When it became his
  2850. turn to cast he cast it on one of my weak walls.  The
  2851. wall then had 83 life points.  Please fix. Fixed by SAI.
  2852.  
  2853. ***********************************************************************
  2854. *********************** Music System Upgrade **************************
  2855. ***********************************************************************
  2856.  
  2857. * After ages of hacking and slashing music asm code I am now ready to
  2858.   integrate the new music playback system into Chaos.
  2859.  
  2860. * Downloaded and installed util/pack/xpk_Develop.lha so I can assemble
  2861.   player.asm -> player.o 
  2862.   New music system supports compressed music IF you have xpk libraries
  2863.   installed; otherwise it doesn't.  xpk libraries NOT required.  It is
  2864.   just an extra added option for someone who wants to replace the game
  2865.   music with their own (compressed) music.  Or perhaps we will use
  2866.   compressed music at some point. Who knows?
  2867.  
  2868.   Here is what I did with xpk:
  2869.   Put the archive into t:
  2870.   lha x #?
  2871.  
  2872.   cd t:xpk_develop/include/c
  2873.   copy all to include: clone
  2874.  
  2875.   cd t:xpk_develop/include/asm
  2876.   copy all to include: clone
  2877.  
  2878.   cd t:xpk_develop/autodocs
  2879.   copy all to include:autodocs clone
  2880.  
  2881. I didn't know where else to put the autodocs...
  2882.  
  2883. I have no particular plans for using xpk from C but you never can tell what
  2884. the future will hold so I installed the C files for completeness.
  2885.  
  2886. * Commented out EVERYTHING to do with the awful ptreplay.library.
  2887.  
  2888. * Music.lib
  2889.   In preparation of the new music system I have joined 27 files into 1
  2890.   music.lib file which contains all the asm code related to the new music
  2891.   system. (12 .asm files, 12 .o files and 3 .i files.)  All those files must
  2892.   reside in INCLUDE: in order to assemble correctly and since I don't feel
  2893.   like reading the instructions to figure out how to make them assemble from
  2894.   any directory it is just easier to assemble them like that and then whack
  2895.   them all into one big 32k music.lib which can be easily included in the
  2896.   archive.
  2897.  
  2898. * Chaos is currently 1100836 bytes.  After linking with the new music
  2899.   system it is now   1100836 bytes!  Either slink is much better or much
  2900.   worse than I thought it was!  I just linked with the 32k music.lib and
  2901.   either slink didn't do it or it noticed that there are are NO calls to
  2902.   any functions in the .lib file currently so it intentionally didn't
  2903.   include it. Yes that must be it.
  2904.  
  2905. * In a frantic attempt to get ciab.resource to open (it always failed) I
  2906.   commented out all the timing code from Chaos.  Still didn't work.  Ok,
  2907.   now I figured it out.  A damn misplaced semicolon...
  2908.  
  2909.   Ok I just tried to link in the music.lib while actually referencing 1
  2910.   variable from music.lib and I just got TONS of undefined variable errors.
  2911.   Looks like I must do a LOT more hacking and slashing.
  2912.  
  2913.   Ok I've reduced it from 46 errors to 25.   This is the first time it has
  2914.   actually compiled into a file:
  2915.   1099680 -> 1125768 bytes  so it seems to have only added 26k.  WOW, if
  2916.   that value holds then that is EXCELLENT!  Much better than the 40k I
  2917.   thought it was going to be!
  2918.  
  2919.   Details of what I did to force the new music system into Chaos appear in
  2920.   the file INCLUDE:errorlistmusic. (2.6k)  and more info is in the asm
  2921.   source player.asm
  2922.  
  2923. * WOOHOO!  Successfull linkage of music.lib with Chaos achieved on
  2924.   Sunday, December 14th, 1997.  That was just to get it all linked
  2925.   together.  I haven't put any code in Chaos to actually call any of the
  2926.   routines in music.lib yet so there is still much to do.
  2927.  
  2928.  
  2929. * ROUTINES in music.lib:
  2930. *** setsong - Start playing a different song in the current module
  2931. * d0 = Song number to start playing
  2932.  
  2933. *** loadmod - Load a module without playing it
  2934. * a0 = Pointer to filename
  2935. * Returns: d0 = Null if successful, pointer to error message if failed
  2936.  
  2937. *** playmod - Play an already-loaded module
  2938. * d0 = Song number (-1 = user's choice)
  2939. * Returns: d0 = Null if successful, pointer to error message if failed
  2940.  
  2941. *** startmod - Load a module and start it playing
  2942. * a0 = Pointer to filename
  2943. * d0 = Song number (-1 = user's choice)
  2944. * Returns: d0 = Null if successful, pointer to error message if failed
  2945.  
  2946. *** contmod - Continue a module from where it left off
  2947. * Returns: d0 = Null if successful, error message if failed
  2948.  
  2949. *** contplaymod - Continue current module if possible, otherwise restart it
  2950. * Returns: d0 = Null if successful, error message if failed
  2951.  
  2952. *** stopmod - Stop a playing module
  2953. * Returns: d0 = NULL
  2954.  
  2955. *** endmod - Stop and unload a module
  2956. * Returns: d0 = NULL
  2957.  
  2958. There are other routines for changing playback speed and volume but I
  2959. haven't worked out how to use them yet.
  2960.  
  2961. So all we need for the intro music is
  2962. startmod("filename",0);
  2963. // blah blah blah
  2964. endmod();
  2965.  
  2966. YAY!  IT REALLY WORKS!!!
  2967.  
  2968. 2 small problems though:
  2969.  
  2970. 1) The current sound effects system opens up and
  2971.    hogs 1 audio channel throughout the entire game.  If it does this while
  2972.    the music is playing then it messes up the music.  I worked around this
  2973.    by moving the code that opens the audio.device and hogs the channel so 
  2974.    that it is no longer in CommenceChaos but rather right at the end of the
  2975.    setupscreens.
  2976.  
  2977. 2) It is incompatible with Say();  calling Say while
  2978.    music is playing screws up the timing of the music and makes it sound
  2979.    awful.  However, playing a sampled sound during the music does WORK
  2980.    PERFECTLY!  So we must either:
  2981.    A) Not play music while using Say();
  2982.    B) Not use Say(); while playing music.
  2983.    C) Make some sort of workaround for Say();  However I have no idea how
  2984.       to approach the idea of making a workaround.  I guess Say messes up
  2985.       the CIA timing registers?  Perhaps the AmigaSpeech just plain isn't
  2986.       truly system friendly?  Who knows?
  2987.  
  2988. For now I will comment out the line that says "Welcome to the Magic Zone"
  2989. so that the music can play during the setup screens.  It will be a simple
  2990. matter to replace this Say(); with an actual sampled sound file. (Something
  2991. I've been planning to do for months anyway).
  2992.  
  2993. Actually it could be WaitForSay(); that causes the incompatability for
  2994. all I know.
  2995.  
  2996. * 218K of asm source code was used to produce music.lib.
  2997.  
  2998. Now that the new music system is _finally_ in and working:
  2999.  
  3000. * ADVANTAGES of new music system vs. ptreplay.library.
  3001.   1. It actually works.
  3002.   2. It works on MC68000 processors unlike ptreplay.library.
  3003.   3. It can play SoundTracker/NoiseTracker/MutantTracker/ProTracker music
  3004.      without messing them up like ptreplay.library did.
  3005.   4. Also supports 8-channel Oktalyzer music. (untested at this time)
  3006.      ptreplay.library has no 8-channel support.
  3007.   5. It has a rudimentary IFF 8SVX sound sample play routine also.
  3008.   6. It was originally written by my good buddy Bryan Ford the MEGACODER.
  3009.   7. It is very easy to add med/octamed support should we decide to do so.
  3010.   8. It is very easy to add support for a BUNCH of other music formats but
  3011.      those other formats are all irrelevant AFAIK.
  3012.   9. MOST IMPORTANTLY: It _shares_ the sound channels in a system friendly
  3013.      manner!!!  Something that _NO_ other replay routine does!!! (That I
  3014.      know of or could find any evidence of or have even heard of.)
  3015.  
  3016.      Sharing the sound channels _may_ be desirable in the general game so
  3017.      that music can be playing while the sound effects are playing too.
  3018.      However this may sound too jarring with multiple sound effects being
  3019.      played.  Only experimentation will tell.
  3020.  
  3021.      Sharing the sound channels _IS_ _DEFINITELY_ required for a truly
  3022.      system friendly and multitasking game.  If the player routine doesn't
  3023.      share the channels then the AmigaOS DisplayBeep(); function CANNOT
  3024.      make any sound!  This is unacceptable IMHO.  Especially when you are
  3025.      sorting your database or copying a disk or browsing the web while
  3026.      the game music is going on.
  3027.  
  3028.      I investigated many, many replay routines and NONE of them shared the
  3029.      sound channels.  They all just hogged all 4 channels and wouldn't let
  3030.      any other sounds get through no matter how important the sound was!
  3031.  
  3032. * DISADVANTAGES of new music system vs. ptreplay.library.
  3033.   1. Takes 26k instead of only 10k.
  3034.   2. It might be a LOT slower.  I just don't know.  We need to somehow test
  3035.      its speed by running a program and timing it then running the same
  3036.      program again with the music going and see if there is a speed
  3037.      difference.
  3038.   3. It isn't a shared library so it can't be flushed out in a low memory
  3039.      situation.
  3040.   4. It doesn't have volume fade in/out because I haven't got around to
  3041.      implementing that yet.  This isn't really a disadvantage though since
  3042.      the volume fade in/out of ptreplay.library caused crashes anyway.
  3043.  
  3044.  
  3045. * DELETED all code related to ptreplay.library.
  3046.  
  3047. * In the future I might remove the 8-channel music support if we don't end
  3048.   up using my 8-channel music or if the 8-channel playback doesn't work 100%
  3049.   That would save several K.
  3050. * In the future I might add volume fading in/out.
  3051.  
  3052. * All in all, Chaos now has a better music playback system than any other
  3053.   Amiga game.  Most games have an option for music OR sound effects but
  3054.   Chaos can have BOTH if we so desire.
  3055.  
  3056. * AAAUUUUGGHH!!!!  I just did a DisplayBeep during the music and the music
  3057.   PERMANENTLY lost a sound channel!!  It also caused some other glitches in
  3058.   the music playback.  I don't understand this.  I can play sampled sounds
  3059.   all day long from the CLI and everything works perfectly... I don't know
  3060.   why this music system is not cooperating with DisplayBeep and Say.
  3061.   Ok, I changed my preferences: I changed the sound type from "beep" to
  3062.   "sound sample" now the display beep makes NO noise and doesn't steal a
  3063.   channel.  !?!?!  For "beep" to make a sound and "sound sample" to not
  3064.   make a sound in DisplayBeep means that there must be a bug in the OS.
  3065.  
  3066.   This whole situation also means that there must be some secret coding
  3067.   technique that is used in the way I play my sound samples from the CLI
  3068.   that allows it to borrow a sound channel, use it and then give it back
  3069.   without causing any damage.  This will all require a lot more
  3070.   investigation.
  3071.  
  3072. ***********************************************************************
  3073. ******************** END Music System Upgrade *************************
  3074. ***********************************************************************
  3075.  
  3076. BUG? I was playing a nice little game... I had surrounded a bipedal
  3077. generator except for 1 cell.  I just cast a faun into that cell. Then it
  3078. said "Banderlog sleep" and my Red Dragon was put to sleep and instantly
  3079. collapsed!  ARGH!  There are no banderlog's on the screen!  Could my Faun
  3080. have cast sleep on my own creature?
  3081.  
  3082. The exact same thing just happened again! This time my gorilla got put to
  3083. sleep!  I think maybe I am casting creatures onto a dead banderlog.
  3084.  
  3085. Now I'm in a completely different situation and my Faun just put my harpy
  3086. to sleep.  This faun has killed more of my creatures than the enemy has.
  3087.  
  3088. Now my other faun on the other side of the board put my manticore to sleep.
  3089. I guess Fauns just cast their sleep spell on anybody...
  3090.  
  3091. Now my faun put my Crocodile to sleep.
  3092.  
  3093.  
  3094. I had always intended that you press the "c" / "r" / "s" / "m" keys ONCE
  3095. and the color cycling would take care of the flashing for you.  But I just
  3096. now accidentally held the "c" key down for a while and it started flashing
  3097. completely on/off in an almost acceptable manner.
  3098.  
  3099.  
  3100. ***********************************************************************
  3101. **************** Efficiency Upgrade Speed/Memory **********************
  3102. ***********************************************************************
  3103.  
  3104. **********************        Part 1       ****************************
  3105. ********************** __near data upgrade ****************************
  3106.  
  3107. * SOLUTION to near/far data problem.  There is no problem!  The compiler
  3108.   defaults to always using FAR data.  But this is easily overridden by
  3109.   using the __near keyword on any varibles that we want to keep in the near
  3110.   64k dataspace.  Keep in mind that some vars are accessed in the asm code
  3111.   as FAR so we have to leave those as FAR (or add the __near keyword AND
  3112.   edit the asm code).  So if you ever have a variable that gets used a lot
  3113.   then feel free to use the __near keyword on it.
  3114.  
  3115. * As a test I will just make board be a __near variable.
  3116.   1126496 -> 1123868 Cool! Saved 2628 bytes! This savings should
  3117.   translate at a 3:1 ratio so that's about 876 bytes saved on smake
  3118.   release.  Don't forget __near variables are faster too.
  3119.  
  3120. * More C lameness: I just moved a bunch of variables from far to near in
  3121.   prog.tex.  I only recompiled prog.tex and start.tex to quickly eliminate
  3122.   the simple errors.  Yet it compiled and linked perfectly!!!  Even though
  3123.   there were TONS of far references to variables that were now defined and
  3124.   initialized as being in the __near data section!  I couldn't believe my
  3125.   eyes!  I knew there was NO way such a program could possibly run but I
  3126.   wanted to prove it so I ran this newly compiled Chaos and sure enough
  3127.   *BOOM*.  Up came the requester: "Software failure: Suspend or Reboot".
  3128.  
  3129. * After switching over all appropriate variables in prog.tex from far to
  3130.   near: The filesize is now 1113932 for a total savings of 12564 bytes.
  3131.  
  3132. * Ok, I rummaged around through all the other .tex files and transferred
  3133.   over a few variables here and there to __near. Even changed vp in the
  3134.   C and asm code to be near. Filesize is now
  3135.   1112396 325868
  3136.  
  3137. * Changed vp to be near (in asm code too).  DID NOT WORK no matter what I
  3138.   did. 8(
  3139.  
  3140. * __near vs. __far
  3141.      4         6     Bytes of code required to access the variable.
  3142.     12        16     Cycles required to access byte or word variable on 68000.
  3143.     16        20     Cycles required to access long variable on 68000.
  3144.   
  3145.   move.l var(a4),d0    Asm near var.
  3146.   move.l var,d0        Asm far  var.
  3147.  
  3148.   GRAND TOTAL SAVINGS: 14100 bytes.
  3149.  
  3150. ******************* END __near data upgrade ***************************
  3151.  
  3152. **********************        Part 2       ****************************
  3153. **********************    Macros Upgrade   ****************************
  3154.  
  3155. int t3=board[c].char_stat.Stat; Produces the following asm code:
  3156. move.l    d4,d0            ;  4 cycles
  3157. asl.l    #2,d0            ; 12 cycles
  3158. sub.l    d4,d0            ;  6 cycles
  3159. asl.l    #2,d0            ; 12 cycles
  3160. sub.l    d4,d0            ;  6 cycles
  3161. asl.l    #3,d0            ; 14 cycles
  3162. movea.l    a0,a1            ;  4 cycles
  3163. adda.l    d0,a1            ;  6 cycles
  3164. move.l    0014(a1),0018(a7)    ; 28 cycles
  3165.  
  3166. GRAND TOTAL CYCLES:        ; 92 cycles
  3167. GRAND TOTAL BYTES :             ; 22 bytes
  3168. The above code is actually much smaller and faster than I expected.
  3169.  
  3170. Now look at the code generated by:
  3171. int t4=cell->char_stat.Stat;
  3172. move.l    0014(a5),0014(a7)    ; 28 cycles.  3.28x faster than above!
  3173.                 ;  6 bytes.
  3174.  
  3175. So we can basically save 16 bytes and 64 cycles each time we use a new
  3176. IsUndead(cell) macro instead of an old isUndead(cell) macro.
  3177.  
  3178. * NEW PROGRAMMING RULE: macros which start with a lowercase letter
  3179.   (isUndead) require a numerical parameter while macros that start with an
  3180.   uppercase letter (IsUndead) require a pointer to a playCell structure.
  3181.  
  3182. * Changed: AttacksLiving into attacksLiving and AttacksUndead into
  3183.   attacksUndead.
  3184.  
  3185. * All "is" macros now also have an "Is" form in predicate.tex.
  3186.  
  3187. At the beginning of this project the size of Chaos is:
  3188.   1112396 / 325868 bytes.
  3189.  
  3190. * CHANGED isFlying from a function into a macro.
  3191.   1112208 / 325844 Saved 24 bytes.
  3192.  
  3193. * Made "Is" versions of "is" functions in predicate.tex plus optimized the
  3194.   "is" functions.
  3195.   1112572 / 325904 Lost 60 bytes but saved 64/128 cycles here and there.
  3196.  
  3197. * Edited spell.tex:
  3198.   1112620 / 325804 Saved 100 bytes.
  3199.  
  3200. * Edited cast.tex:
  3201.   1112568 / 325664 Saved 140 bytes in isIllegalCast
  3202.   1112020 / 325004 Saved 660 bytes in isStupidCast
  3203.   1111888 / 324800 Saved 204 bytes in DoComputerCast
  3204.   1111832 / 324672 Saved 128 bytes in Drainer
  3205.   1111796 / 324560 Saved 112 bytes in PlasmaBeamHandler  
  3206.   1111804 / 324536 Saved  24 bytes in Multiplicity
  3207.   1111728 / 324432 Saved 104 bytes in CastSpells
  3208.   1111732 / 324432 Saved 000 bytes in PossibleChoice ???
  3209.   1111716 / 324400 Saved  32 bytes in Generate
  3210.   TOTAL SAVED cast.tex  1404 bytes.
  3211.  
  3212. * "c" key is faster now that spell.tex and cast.tex have been optimized.
  3213.  
  3214. * Edited cell.tex (ReDrawCell + AutoAccept)
  3215.   1111684 / 324288 Saved 112 bytes.
  3216.  
  3217. * Edited prog.tex:
  3218.   1111588 / 323316 Saved 972 bytes by removing AnColBackup and AnRowBackup.
  3219.   1111088 / 322828 Saved 488 bytes in Animator.
  3220.   1110600 / 322444 Saved 384 bytes in HandleIDCMP.
  3221.   1110608 / 322428 Saved  16 bytes in HandleMOUSEMOVE.
  3222.   1110556 / 322352 Saved  76 bytes in GetSpellSelection1.
  3223.   1110076 / 321924 Saved 428 bytes in BoardUpdate.
  3224.   1109988 / 321816 Saved 108 bytes in CalculateArtifactOwners.
  3225.   1109900 / 321712 Saved 104 bytes in PickUpScrolls.
  3226.   1109908 / 321704 Saved   8 bytes in main.
  3227.   TOTAL SAVED prog.tex  2584 bytes.
  3228.  
  3229. * Edited info.tex:
  3230.   1109592 / 321320 Saved 384 bytes in ExtraDisplay.
  3231.   1108544 / 320380 Saved 940 bytes in InformationPanel1.
  3232.   TOTAL SAVED info.tex  1324 bytes.
  3233.  
  3234. Running out of time.  SI needs new archive by Dec. 22nd so the "Efficiency
  3235. Upgrade" is being placed on hold for now.
  3236.  
  3237. ****** TEMP END of Efficiency Upgrade Speed/Memory ***************
  3238.  
  3239. * Absorbed flashywin.c into Chaos.  Only added about 400 bytes to the
  3240.   executable release.
  3241.  
  3242. * Quadrascope and Spectrogram added to the setup screens to go along with
  3243.   the music.
  3244.   After some hacking and slashing and rearranging I got everything to work
  3245.   and be compatible with the quadrascope and spectrogram.  I had to make
  3246.   some adjustments to the GameGadgets code and rearrange some things and
  3247.   add some lines of code here and there.
  3248.  
  3249. * #define CheckPixelArrays(blah)  Saved about 1000 bytes.
  3250.  
  3251. * Set nasty_audio for the music player to prevent displaybeep from
  3252.   permanently stealing a channel when you overflow a text entry gadget.
  3253.  
  3254. * BUG: When a creature is engaged it can still "attack" an empty cell and
  3255.   move onto it.  NOW FIXED for human players.  This bug may still exist
  3256.   for computer players.
  3257.  
  3258. BUGS: load and quit don't work on setup screen I.  No time to fix.
  3259. I don't really know how to fix them quickly because part of the problem is
  3260. adding gadgets that are already there or removing gadgets that are not
  3261. there.  I don't know much about gadgets so I won't muck about with this
  3262. now.  Just remember that the GameGadgets need to NOT be attached to window
  3263. during the setup screens but they DO need to be attached to the window
  3264. during the entire rest of the game.
  3265.  
  3266.  
  3267. * I made a smake release and tested it on my A2000 and disabled the chipram
  3268.   down to 512k to see if it would work.  IT DID!!!  AMIGA RULES!!!
  3269.  
  3270.   On a 1 meg Amiga with 512k chipram and 512 fastram here is the memory
  3271.   availability when the game is autobooted from a minimal boot disk with NO
  3272.   unneccessary stuff loaded and making use of the wonderful Add36k command.
  3273.   This is while running chaos with a standard stack of 4096 bytes.
  3274.   I wouldn't recommend using a stack bigger than 8000.
  3275.   
  3276.   btw: The disk is 94% full.
  3277.  
  3278.   Time:   Chipram Available:  Fastram Available:
  3279.   Intro   47496               55920
  3280.   Setup   56376               111592
  3281.   Game    205304              111320  (Examined while "about" screen was up.
  3282.   Game    256104              111320  (Just looking at the board.)
  3283.  
  3284.   The numbers for the Intro and Setup seem dangerously low to me.  It would
  3285.   only take *1* piece of fragmentation to cause them to fail.  Indeed, it
  3286.   seems like a miracle that it is working.  Maybe its a Christmas Miracle?
  3287.  
  3288.   I just can't imagine any W95 program running with only 55k of free ram
  3289.   and not crashing after 5 minutes or so.
  3290.  
  3291. I noticed that the whole game sounds different on the slower 7Mhz 68000.
  3292. The lineofsight routine is still too slow on 7Mhz 68000 as can be seen
  3293. by the delay in pressing the "c" key when trying to cast something with
  3294. long range that requires line of sight. (Like trees or castles).
  3295. Oh well, nothing can be done about that.
  3296.  
  3297. Sending an archive to SAI on Sunday December 21, 1997 for testing during
  3298. Christmas holidays.  Also sending an archive of my autobooting floppydisk
  3299. version for OS1.3 Amigas.
  3300.  
  3301. -------------------
  3302.  
  3303. * Adjusted alignment of scopes to allow them to run a bit faster.
  3304.   Saves 64 chipram reads and 64 chipram writes per frame drawn per scope.
  3305.  
  3306. * Rewrote the quadrascopes to run at 3x the framerate that they were running
  3307.   previously.  They now run at MAXIMUM speed (50 fps).  Quadrascopes are
  3308.   now much more "electric".
  3309.  
  3310. * Rewrote the spectrogram to run at 3x the framerate that it was running
  3311.   previously.  It now runs at MAXIMUM speed (50 fps). Also rewrote the
  3312.   \decspec routine in flash.asm to be much faster.  The spectrogram now
  3313.   descends much more smoothly. (1 pixel per frame instead of 3 pixels at
  3314.   once every 3rd frame.)
  3315.  
  3316. * Implemented a new jcspectrogram.  It is a  new version of the above
  3317.   spectrogram but this one has colors and is faster too. I left the old
  3318.   spectrogram intact in music.lib in case we want to use it in the future
  3319.   for some reason.
  3320.  
  3321. * Rewrote intflashnote in misca.asm to be faster and take less memory.
  3322.  
  3323. * Commented out most of the unused variables from misca.asm. SAVED 1808
  3324.   bytes on the music.lib filesize.
  3325.  
  3326. * Rewrote part of the Quadrascope to save 66,800 cycles per second on A500.
  3327.  
  3328. Christmas Eve playtesting with Joseph:
  3329. * BUG: Artifact ties were being awarded to the higher player number rather
  3330.   than to NOBODY.  NOW FIXED.
  3331.  
  3332.  
  3333. My brothers had not playtested Chaos in months.  They had completely lost
  3334. interest in the game.  Joseph even explicitly said that "I just don't have
  3335. the attention span required to play Chaos."  I thought that they would
  3336. never play it again... 8(
  3337.  
  3338. But I got Joseph to notice the game when he came into the room while I was
  3339. working on the speeded up Quadrascope so we got to talking about the new
  3340. features and within an hour of playing he was telling Jerry he should start
  3341. playing the game again because the "The game is really groovy now."
  3342.  
  3343. Joe and I played 2 games with about 20 hidden artifacts + 20 hidden scrolls
  3344. each. The first game we had only 20 spells and the next one we had 40 spells.
  3345.  We had 3 or 4 generators and a few computer players against us.  The game
  3346. had a whole different flavor as we went around mining for spells and
  3347. learning how to use artifacts.  We played where only wizards could pick up
  3348. spells.  I liked that a lot.
  3349.  
  3350. JJ and I played 2 games with 99 spells, Texas Trash'em, 20 UNhidden scrolls
  3351. and 20 UNhidden artifacts.  I was near death from turn 1 due to being near
  3352. too many enemy artifacts and generators but luckily I cast a Reflector
  3353. which set me up in a good safe position.  The game would have probably
  3354. lasted a very long time but JJ made a fatal mistake.  He took control of a
  3355. Damaged Dalek Artifact and shot my wizard (thinking he would kill me).
  3356. Of course the FULL brunt of the impact reflected back on the Dalek and it
  3357. died. So there was this dead dalek just laying there so I cast Raise Dead
  3358. on it and started chasing after his Wizard and killed him.  Game over man.
  3359.  
  3360. The next game was INCREDIBLY interesting...  The top 2 corners had simply
  3361. too many Computer Wizards and generators to venture near.  That left the
  3362. bottom right corner which was quite safe and quite devoid of usefull
  3363. scrolls and artifacts.  And the bottom left corner which had a Range Boost
  3364. Scroll and a Double Scroll and 2 Bolter Wall artifacts with NO generators
  3365. or enemy wizards nearby. 
  3366. First turn:
  3367. I cast a pegasus so I could get over to the corner ASAP. That
  3368.  was my fastest creature.  I didn't have a teleport.
  3369.  
  3370. JJ cast Teleport and was IMMEDIATELY in a GREAT position in the bottom left
  3371. corner.
  3372.  
  3373. I dediced "Damn the bolter walls!  Full speed ahead.
  3374.  
  3375. Turn 2: I get shot by the bolter wall which JJ now controls but I
  3376. psychotically decide not to retreat.
  3377.  
  3378. Turn 3: I move my pegasus as close to the botom left corner as possible.
  3379. Which is still 2 squares away from the bolter wall.  I get shot by the
  3380. bolter wall again AND some other guy's dragon breathes on me and kills my
  3381. Pegasus.  So my wizard is just standing there exposed.
  3382.  
  3383. Turn 4: I cast a creature next to the bolter wall and made it back to being
  3384. nobody's.
  3385.  
  3386. I don't remember the exact way things happened from there on out but all I
  3387. know is that each individual turn I was in SEVERE danger of dying.  I had
  3388. to cast the EXACT right spell in the exact right way to survive.  It was an
  3389. enormous power struggle for control of that corner.  Each turn I ALMOST got
  3390. the upper hand and became powerful but each turn my plans were thwarted by
  3391. JJ. At one point I had my wizard and elephant next to the bolter wall so it
  3392. was GOING to become mine after we cast spells.  This means I was going to
  3393. win (bolter wall hit plus elephant hit on his wizard = death)  But then he
  3394. gave up fighting for the artifact and cast brain drain on it.  I was sorely
  3395. tempted to cast Raise Dead on it but *I* was also about to die immediately
  3396. so I couldn't. 
  3397. He cast a lion to go around my elephant and eat my wizard so I HAD to
  3398. cast sleep on the lion right that turn.  Problem solved, except that he
  3399. cast FREE on my elephant!!!!  ARGH!!!!  Then he woke up his Lion!!!  I had
  3400. just finally cast cloak but after all the attacks that round even with my
  3401. cloak I was down to 2 points of life.  So I had to retreat back to the
  3402. middle of the board which was basically empty except for a bolter wall
  3403. artifact and a dalek artifact.  Once I quit psychotically trying to attack
  3404. that corner I became quite powerful.  Instead of just trying to survive from
  3405. one turn to the next in a defensive manner I was able to concentrate on
  3406. trying to do something more offensive in nature.  hehehehe  Like I cast a
  3407. wall spell around his wizard and boxed him in on the side of the screen and
  3408. made him abort his undead creature! hehehehe.  Then the FREED elephant
  3409. killed his lion and an enemy bear has wandered into the corner so he is now
  3410. in an interesting position. By then it was 1:00 A.M. so we saved the game
  3411. and he went to bed.
  3412.  
  3413. I would NEVER have played so agressively in the olden days.  But all that
  3414. kewl stuff in the corner activated the "greed factor" in us so we all went
  3415. there to fight over it.
  3416.  
  3417. Christmas day playtesting with Jerry, Joseph and JJ.
  3418. * BUG: Inanimate objects are exerting influence on artifacts. NOW FIXED.
  3419.  
  3420. * BUG: Joe cast Magic Bolt on a web and it increased the web's life to 33
  3421.   points or something. Now REALLY fixed.
  3422. * BUG: I cast a Magic Bolt on a freshly generated skeleton.  The skeleton
  3423.   then had 25 life points! Now REALLY fixed.
  3424.  
  3425.  
  3426. BUG: computer wizard cast dark citadel several squares away.
  3427. BUG: computer wizard cast alliance and nothing happened. Maybe he aborted
  3428. it?
  3429.  
  3430. Ok, I'm home now and looking at the bolt bug.  The *= -MSF fix is there in
  3431. the spell file.  (I put it in the day you gave it to me.)  But SOMEHOW it
  3432. is not in castmagic.c!!!!!!!  ARGH!!!!!!!!!!!!!!  Hmmm... I could have
  3433. sworn I did a smake clean before I did smake release....  I guess maybe
  3434. smake clean doesn't rebuild the castmagic.c....  The date on castmagic.c is
  3435. December 5th!!!  oh well... I am doing a smake newspell now, then a
  3436. smake release then we will playtest some more.
  3437.  
  3438.  
  3439. Re: new font.  I noticed that the fancy font was much easier to read on my
  3440. old Amiga 1084S monitor when I was testing the 1 meg version.  Something
  3441. about the fuzziness smooths it out or something.
  3442.  
  3443. BTW: We were all gathered around for Christmas dinner with jillions of
  3444. relatives and my dad asked me "Why can't I read the letters on my screen?"
  3445. He said he thought something was wrong with his computer or monitor.
  3446. Admittedly my dad has serious vision problems. His eyesight was HORRIBLE
  3447. but then he had corrective laser surgery done twice and his vision is much
  3448. better now.  He still wears contact lenses but they are many times less
  3449. powerful than his old ones.  As a quick fix I am disabling the fancy font.
  3450. Feel free to add a menu option for "Fancy Fonts" on the drop down menus if
  3451. you so desire.  He was using a 1084S monitor when he registered his
  3452. complaint.
  3453.  
  3454. Joe wants auto-switching with numeric keys.
  3455. Joe wants number of kills on score screen.
  3456. Joe is dying for the graphics upgrade to be implemented.
  3457.  
  3458. * Edited some spell descriptions and removed spell-casting ability from
  3459.   Faun because I really hated it and couldn't stand it any longer.
  3460.  
  3461. * Played more games of Chaos with relatives.  One of which I REALLY wish
  3462.   I'd saved on turn 1.  It was so incredibly strategic!  As it turned out,
  3463.   each individual player had to cast exactly the right spell in exactly the
  3464.   right spot for several turns or they would die.  It was AWESOME!  Totally
  3465.   cool!  Hopefully I will make a level like that someday.  (Only really
  3466.   works with exactly 3 players though.)  I ended up dying after several
  3467.   turns all because I cast the wrong spell on turn 2.
  3468.  
  3469. * FLAW: Wizards kept subverting/abducting/betraying artifacts.  NOW FIXED.
  3470.  
  3471. * Changed: Bipedal generators no longer produce bears.
  3472.  
  3473. * Changed: Moved end-of-turn gadget to be FAR away from question mark
  3474.   gadget.  My entire family has been bugging me about this for years. Every
  3475.   time we play they say "That shouldn't be there next to the question mark."
  3476.  
  3477. * Implemented jcquadragram (jcquadspectrogram).  I've always wanted to do a
  3478.   seperate spectrogram for each of the 4 sound channels for many, many
  3479.   years.  I've always wanted to watch the different notes of the same
  3480.   instrument "dance" as they play.  Only now that I have finally done it,
  3481.   it doesn't seem quite as cool as I had hoped.  Oh well, maybe others
  3482.   will have a different opinion.
  3483.  
  3484. * JCquadspectrogram has 32-note resolution.  The original spectrogram and
  3485.   jcspectrogram had only 16-note resolution.  In spite of the increased
  3486.   resolution it is still about the same speed as the original jcspectrogram
  3487.   due to the fact that it caches pixels in a register and then writes out
  3488.   whole words at a time to chipram instead of 1 byte at a time.
  3489.  
  3490. * l key for line of sight.  It works like the other keypresses execpt that
  3491.   this one simply shows all the cells that can be seen from the current cell.
  3492.   This is very useful if you are thinking of casting a certain spell that
  3493.   needs line-of-sight and you want to be sure that you have it.  Simply
  3494.   place the mouse pointer over your wizard and press "l" to see all the
  3495.   cells that he has line-of-sight into.
  3496.  
  3497. * Fixed it so that the game startup after setup screen II doesn't look so
  3498.   bad on slow machines.
  3499.  
  3500.  
  3501. SCREWEY BUG: The game has been working great for ages.  But suddenly,
  3502. every time I do a smake release the game crashes on setup screen I.  Yet if
  3503. I do smake clean  smake dev it works fine.  But then I do smake clean smake
  3504. release and it crashes on setup screen I.   I can do a smake release and 
  3505. then ONLY recompile init.tex as smake dev and everything works fine.
  3506. Totally strange.  What could be causing this???
  3507.  
  3508. * Ok I've worked around it by forcing init.tex to NOT compile with the
  3509.   "optimize" option.  Now everything is working perfectly again.
  3510.  
  3511. * The line of sight testing was just too slow on A500 so I rewrote
  3512.   isLineOfSight to burn up some memory but be 25% faster than before.
  3513.  
  3514. Joseph tried to design a level with your level editor but it went bonkers
  3515. when he tried to insert the wizards.
  3516.  
  3517.  
  3518. * EGADS!  I was looking around through the Protracker Replayer Asm code,
  3519.   trying to figure out how to implement my new instrument-flasher when I
  3520.   became aware of the fact that the internal data format and file format
  3521.   for protracker mods is horribly lame!  For example, the instrument #'s
  3522.   are stored as a byte.  But the upper 4 bits of the byte are stored as
  3523.   the upper 4 bits of byte 1 and the lower 4 bits of the byte are stored as
  3524.   the upper 4 bits of byte 3.  So all this anding, shifting and oring crap
  3525.   has to be done.  The net result is that the act of getting the current
  3526.   instrument number takes 7 machine instructions instead of 1 like it
  3527.   should.  YICK!  Oh well, at least I optimized it to now take only 6
  3528.   instructions.
  3529.  
  3530. * Due to the lame data format there are about 50 stupid anding instructions
  3531.   in the ptsplay asm code that wouldn't be needed if the file format made
  3532.   sense. However I have now optimized the code and eliminated 4 of them,
  3533.   saving 16 bytes and some cycles.
  3534.   But to eliminate the others would require a whole new file format.
  3535.  
  3536. I noticed there were many other optimizations that I could do but I would
  3537. need to use a temp register to implement them and I am unsure if it is safe
  3538. to do so in those routines.  Maybe I'll investigate it later.
  3539.  
  3540. * The archive was too big to fit on 1 720k floppy so I deleted the music
  3541.   from the archive.  The music has never changed since the day I first put
  3542.   it in anyway.  So for now the music/ dir won't be passed back and forth
  3543.   in the archive.
  3544.  
  3545. ***********************************************************************
  3546. ************************* 1 Year Overview *****************************
  3547.  
  3548. Well it is now Jan 6th, 1998.  I have been coding on Chaos for 1 year now.
  3549.  
  3550. We have acheived quite a lot during this time:
  3551.  
  3552. 1) Numerous bug fixes
  3553. 2) Numerous new features
  3554. 3) Numerous new spells
  3555. 4) Numerous code optimizations
  3556. 5) I ended up adding over 256K of asm source to the game, quite a bit more
  3557.    than I originally planned, with lots more on the drawing board.
  3558.  
  3559. The readme file of all the improvements is over 158K
  3560.  
  3561. I noticed back in October, 1997 that my C coding speed had noticeably
  3562. increased to the point that I could code in C just as well as asm.
  3563.  
  3564. There is still an AWFUL lot more work to do, but all in all it has been a
  3565. year filled with great achievments.  Keep up the good work.
  3566.  
  3567. *************************************************************************
  3568.  
  3569. JC: ReleaseSemaphore
  3570.  
  3571.  
  3572.  
  3573. Chaos readme (cont.)
  3574. ====================
  3575.  
  3576. This file continues Readme.1997
  3577.  
  3578. BEGIN: Chaos 2.2
  3579.  
  3580. SAI: Xmas report extracts follow
  3581.  
  3582. There are numerous bugs that we discovered. Some of them are to
  3583. be expected, some you will already know about, others are probably
  3584. better fixed by me. However, I'll list them all down along with
  3585. some other comments.
  3586.  
  3587. * The spell selection by computer players was notably slower on the
  3588.   A500 (this is your new regime of spell selection). However, the
  3589.   real problem here was that there was not enough on screen indication
  3590.   of what was happening. NOW FIXED
  3591.  
  3592. * Somehow there was a sleeping neo-otuygh which was not redrawn.
  3593. * Somehow there was a sleeping ogre-mage that was still animated.
  3594. * Blob grows over earthquake, not sure if I like this or not.
  3595. * The team scores were still not correctly sorted.
  3596.  
  3597. * Several times players shot there own "hidden horrors" to reveal
  3598.   the red dragon. I think the probability of the hidden horror needs
  3599.   to be reduced below that of the red dragon. NOW FIXED
  3600.  
  3601. * The game locks up on the A500 when starting a new game after the
  3602.   completion on the previous game. The only seems to happen when there
  3603.   are lots of wizards. It can also be avoided by starting a new game
  3604.   from the menu before the game ends naturally. I am assuming that this
  3605.   situation is because memory is tight. NOW FIXED
  3606.  
  3607. BUGS:
  3608.  
  3609. * The teleport explode effect is applied to the wrong player. NOW FIXED
  3610. * The boil explode effect is applied to fire rather than water. NOW FIXED
  3611. * The initial set up was the same every time the program was loaded. NOW FIXED
  3612. * If you set the number of turns to "n" you actually get "n+1" turns. NOW FIXED
  3613. * Computer wizards and not conforming to the rules regarding the
  3614.   necropotence spell and discard spell. NOW FIXED
  3615. * Cast agents have an off by one error. Best seen by the Faun casting
  3616.   sleep on his own side. This is probably an improper wizards[]
  3617.   reference. NOW FIXED
  3618. * Dad pressed the end-turn gadget in an attempt to cancel a spell. Instead
  3619.   it tried to cast the creature to some location off the bottom of the
  3620.   screen. NOW FIXED (end of turn ghosted during casting)
  3621. * There is insufficient information given to the player indicating
  3622.   the pick up of a scroll. NOW FIXED (there is a text message and
  3623.   an audio effect)
  3624. * Casting Biohazard gave all scrolls recovery -1 and they subsequently
  3625.   all died in the next round. NOW ALLEGEDLY FIXED
  3626. * Flying creatures still show wings cursor even when engaged. NOW FIXED
  3627. * I cast a Meddle causing the nightmare I was mounted to become a skeleton
  3628.   (i.e. I should now have been mounted on a skeleton); but when I moved the
  3629.   skeleton my wizard was not moved. I think this means I need to check the
  3630.   "mounted" bit carefully when doing reincarnation. ALLEGEDLY FIXED
  3631.  
  3632. * There was a radioactive land scroll. Human players creatures died on
  3633.   trying to enter that cell (which is what is supposed to happen with
  3634.   radioactive land), however, an independent crocodile merely walked
  3635.   onto it. I've yet to check if they are immune from radioactive land
  3636.   in more general circumstances. VERIFIED THIS PROBLEM IS MORE GENERAL
  3637.   THAN I HAD ORIGINAL THOUGHT. Also affects pits. I'm leaving this for
  3638.   the moment pending a bigger revision of computer movement to allow for
  3639.   "eats" and "loathes" and the option of not moving at all.
  3640.  
  3641. * After high-lighting all your creations you need to click end-of-turn
  3642.   twice if you decide to end while high-lighted. This can happen quite
  3643.   often if you just want to check you have moved everything before ending
  3644.   your turn. THIS DIDN'T HAPPEN ON MY COMPUTER -- DID YOU FIX THIS?
  3645.  
  3646. COMMENTS:
  3647.  
  3648. * Callum suggested the horn on the Abath should swing.
  3649.  
  3650. * Glen pointed out that the archery spell description does not actually
  3651.   say what the spell does, although he guessed correctly.  NOW FIXED.
  3652.  
  3653. * Computer players seem to make excessive use of Justice type spells
  3654.   early in the game, leaving them short on powerful spells later in
  3655.   the game. We often found ourselves holding back our styrong creatures
  3656.   for the first five rounds until the computer players exhausted there
  3657.   supply of justice spells.
  3658.  
  3659. * Computer wizard no longer casts castles close to wizard. (I originally
  3660.   had code forcing wizards to cast castles adjacent to the wizards, but
  3661.   I guess you deleted that in making the routines the same -- perhaps
  3662.   we need to build a little more intelligence here).
  3663. --JC Reply: I didn't delete the code.  It was still there all this time;
  3664. it just no longer had any effect in the new system.  All has been FIXED
  3665. now. 8)
  3666.  
  3667. * Computer wizards make no attempt to collect scrolls (to the extent
  3668.   that they will even get off a scroll if already standing on one).
  3669.  
  3670. * Glen wanted scrolls to appear slowly (something like one a turn,
  3671.   rather than having them all on the screen at the outset).
  3672.  
  3673. * Callum wanted "RETURN" to mean end-of-turn. NOW FIXED
  3674.  
  3675. * Callum wanted a key exit from the info panels, he would most like
  3676.   "q" to start the panel, and then another "q" to exit from it.
  3677.  
  3678. * Callum suggested the right hand set of bars on the info pages be
  3679.   labelled "Recovery" at the top. NOW FIXED
  3680.  
  3681. * Dad didn't like the way that "Abduction" chose growths rather than
  3682.   real creatures.
  3683.  
  3684. More changes:
  3685.  
  3686. * Fixed a bug with Repulsion which could leave the colours permanently
  3687.   screwed up.
  3688. * Made isStupidCast compliant with agent casting.
  3689. * Made menu option for script font on info screens.
  3690. * Made menu option for agent casting.
  3691.  
  3692. ========= Beginning of computer movement upgrade =========
  3693.  
  3694. Phase 1: Elimination of GetPlainWeight in cmove.tex.
  3695.   The function GetPlainWeight is a major bottleneck in the calculation
  3696.   of computer movement since it is called approx. 8n times for each
  3697.   creature to be moved where n is the board size, flying movement
  3698.   requires considerable more calls than this. Further, in a previous
  3699.   effort to improve speed this is *really* only done once for each
  3700.   player per turn, but the games plays better if it is done properly;
  3701.   and this is the only way to implement "eats" and "loathes" properly.
  3702.  
  3703.   A quick look at GetPlainWeight reveals that despite the large number
  3704.   of conditionals most objects return a unique value. There I have
  3705.   added a new tag "Weight" to the spell manager to store the values that
  3706.   this function should return. If the tag is not given for a particular
  3707.   spell, then its value defaults to "Life" as indicated by the function
  3708.   GetPlainWeight. I have already added the tag to the appropriate spell
  3709.   files. Another benefit is we will be able to modify behavious on a
  3710.   level by level basis and have much finer control over computer movement
  3711.   than was previously possible.
  3712.  
  3713.   Well on the subject of crude approximation, note that the current
  3714.   flying movement only considers ranges of one of the creature's
  3715.   maximum (in the past it has been far too slow to do this properly!)
  3716.   YEP, IT USED TO BE WAY TOO SLOW DOING THIS PROPERLY.
  3717.  
  3718.   Also due to an oversight it is impossible for a computer controlled
  3719.   creature to decide not to move if already well positioned.
  3720.  
  3721.   The majority of GetPlainWeight can now be eliminated. Hence it is
  3722.   better inlined inside CalculateWeights. Hence GetPlainWeight is now
  3723.   completely deprecated and has been deleted.
  3724.  
  3725.   Note that the corresponding function GetWizardWeight is called a maximum
  3726.   of about 64 times in a round and hence is not at this time worth
  3727.   modification. I think we can tolerate a slight delay in the movement of
  3728.   wizards, they are after all supposed to be erudite fellows.
  3729.  
  3730. The above has taken care of all the checks except isDead, isAsleep, and
  3731. isTOwned. By modifying some basic functions in core.tex the isDead and
  3732. isAsleep checks can also be eliminated. Thus, the only problematic case
  3733. is isTOwned and since the same table of numbers must be used by all players
  3734. there is no way of circumventing this difficulty. However, we have suceeded
  3735. in reducing 7 conditionals (some with complicated predicates) to a single
  3736. conditional and a table lookup. However, this will eventually increase by
  3737. two conditions when "eats" and "loathes" are implemented.
  3738.  
  3739. Since CalculateWeights was only used in one place and there is no longer
  3740. any advantage in its precomputation I have eliminated it. This is made it
  3741. much easier to implement "eats" and "loathes".
  3742.  
  3743. Two constants control the strength of the "eats" and "loathes" effect and
  3744. these may need to be fiddled with to find nice values. The loathing effect
  3745. is in theory strong enough that a creature would prefer to jump into a pit
  3746. or walk on radioactives (but of course in practice a creature would just
  3747. sidle away from both).
  3748.  
  3749. Stopped the computer from moved onto nuked squares. Allowed computer
  3750. creatures to decide the best option is not to move.
  3751.  
  3752. Computer wizards now move towards and stay on scrolls.
  3753.  
  3754. ============== end of computer movement upgrade ================
  3755.  
  3756. * Added Turns, Dread Elf, Dagger, Gravity, Demonic Touch
  3757. * Added secret power up WoodElf->DreadElf (make 5 kills with wood elf)
  3758. * Added gravity to information display.
  3759. * Fixed FileIO to save gravity information.
  3760. * Changed [] in print statements to () (to work with script font)
  3761. * Classic mode no longer default mode for DEVELOPER
  3762. * Fixed end-of-game bug that caused lockups. Still haven't fixed
  3763.   the quit bug.
  3764. * Allegedly completed implementation of Volcano.
  3765. * Added two new generators: one for birds, one for dragons.
  3766. * Improved the loading and saving of the probability table.
  3767. * FIXED at last the ReleaseSemaphore problem when quiting the game.
  3768. * Improved Spell Manager documentation.
  3769. * Modified InsertCreature to handle player=ASLEEP properly.
  3770. * Made fake wizards actually capable of spell casting.
  3771. * Allowed combat on movement rating (see Arctic Wolf).
  3772. * Added: Arctic Wolf, Virtue, Shadow City, Basilisk, Achiyalabopa,
  3773.   and Paradigm Shift.
  3774. * Added function AddSpecificSpell() to spell.tex (thus you can
  3775.   now give a player a particular spell when desired).
  3776. * Added noddy basic program "sayer" to archive.
  3777. * Made <RETURN> equivalent to end-of-turn. Problem: holding down return
  3778.   will cause multiple player to have end-of-turn. To overcome this I
  3779.   have put in a delay, but this is a rather weak solution. If only there
  3780.   was a RAWKEYUP IDCMP event this would be easy to fix, but I couldn't
  3781.   find anything in the docs about doing this.
  3782. * Replaced $ in chaos.font with a bullet.
  3783. * Improved the image for the Nuke spell.
  3784. * Improved the image for the Lightning spell.
  3785. * Stopped display of Nothing spells.
  3786. * Added: Animate, Ball Lightning, Shocker, Basalt Golem, Emerald Dragon,
  3787.   Willy, Glass, Battle Cry, Coercion, Confidence, Eye for an Eye,
  3788.   Torment, and Materialize.
  3789. * Made the secret powerup GreenDragon->EmeraldDragon.
  3790. * Implemented Eye-for-an-Eye in combat routines.
  3791. * Changed io.tex to take account of changes in Wizards structure.
  3792. * Changed info.tex to display new powerups.
  3793. * Fixed a small problem in the intro sequence where "Wizards" and "Webs"
  3794.   were printed multiple times.
  3795. * Made the lmkfile say "Compilation Complete" at the end, so I can do
  3796.   something else while waiting for a recompile.
  3797. * Made a small change to BoardNormalize for speed.
  3798. * Moved multiplicity information from cast.tex into the spell files using a
  3799.   new tag multiplicity. While I was at it, I increased Strong Wall from two
  3800.   pieces to three pieces, and made Slow and Speed each give three attempts
  3801.   (in an attempt to make these spells more useful).
  3802. * Added "bullet.gif" to archive.
  3803. * Modified the Spell Manager to also produce a HTML WWW page detailing
  3804.   all the spells with an index at the top. This means I can now easily
  3805.   browse the spells on my PC.
  3806. * Added new powerups for creatures making high numbers of kills (in the
  3807.   form of specific bonus spells).
  3808. * Devastation spell now correctly awards points.
  3809. * Added casting contraints to computer spell selection for new spells.
  3810. * Moved the foes vanquished display onto the first info screen.
  3811.  
  3812. ============= start of editor upgrade =========================
  3813.  
  3814. * Added ALT-o menu-like system to editor.
  3815. * Added editor support for artifacts.
  3816. * Stopped insertion of objects belonging to player 0 (other than artifacts)
  3817. * Better support for inserting wizards.
  3818. * Can toggle undead status using "u" key.
  3819. * Undead status shown with a red tick at top of cell.
  3820. * Fixed a ClearBoard/Vanquish/ALT-o edit clash.
  3821.  
  3822. ============= end of editor upgrade ===========================
  3823.  
  3824. * Replaced the reqtools with a file requester of my own making.
  3825.   It is pretty slack at the moment, but at least we can get rid
  3826.   of reqtools now. This is good for three reasons: (i) less
  3827.   effort for uses (don't need to install reqtools), (ii) smaller
  3828.   overall memory requirement for game, (iii) no negotiation 
  3829.   needed with reqtools author for a commercial release.
  3830.  
  3831. * Tidied up prog.tex documentation, particularly near the top.
  3832.   Added a small ancient history section.
  3833.  
  3834. * Allegedly reduced the likelihood of computer creatures shooting
  3835.   wizards protected with invulnerability.
  3836.  
  3837. * I made a bootable disk but for some reason the topaz font was
  3838.   different and had wider width than normal when I started this
  3839.   game. As a consequence some of the set-up screen were not
  3840.   quite right.
  3841. -JC reply: You forgot to have an 80 column system-configuration file in
  3842. your devs/ dir.  If this is missing then the OS defaults to a 60 column
  3843. topaz.
  3844.  
  3845.  
  3846. * If the level now increases above 5, then new spells (and the
  3847.   initial spell list in the case of computer wizards) will be
  3848.   composed mainly of unique spells.
  3849.  
  3850. * Added FLAG_SINGLE to computer assistance flags and increased the
  3851.   assistance array to work from BowID onwards. FLAG_SINGLE in now
  3852.   set for spell which should NOT be cast with double or triple
  3853.   active.
  3854.  
  3855. * Converted the Intelligence stat from 3 bits to 4 bits and modified
  3856.   all spell files, info.tex, and cast.tex accordingly. If we made
  3857.   .MR 4 bits most stats would then be the same, but the MR case would
  3858.   be a lot harder to do than Intel was.
  3859.  
  3860. * Added FLAG_NOWIZARDCELL to the computer assistance flags, to
  3861.   indicate spells not to be applied to cells containing a wizard
  3862.   even if the wizard is mounted or meditating (e.g. Alter Reality).
  3863.  
  3864. * Creatures killing their favourite food now get a combat and
  3865.   recovery rate boost.
  3866.  
  3867.  
  3868. ObtainSemaphore (James Conwell) April 1, 1998  Begin Version 2.3
  3869.  
  3870. * Made a small change to the makechaos file so that it would work ok.
  3871.  
  3872. Upon first compiling the game from a fresh dir using smake unarchive there
  3873. is no rein.h file present so therefore reincalc cannot compile therefore
  3874. when the makefile attempts to run reincalc it simply isn't there and
  3875. doesn't run it.  The makefile then continues on its merry way.  I assume
  3876. this means that critical information is not being compiled into the game
  3877. regarding reincarnation.  As this is the domain of SAI I am leaving this
  3878. for him to fix. NOW FIXED
  3879.  
  3880. * I converted my new game musics which I did months ago into protracker
  3881.   format so they could be played by Chaos but 2 of the musics wouldn't
  3882.   convert correctly due to using more than 31 instruments.  And another
  3883.   converted ok but sounds a bit off (Maybe its just my imagination).  In
  3884.   any case I will have to now add OctaMed support to music.lib in order to
  3885.   play all the new music.  I anticipate this will add several K to the code
  3886.   size.  I guess I won't bother adding this until after the 1 meg version
  3887.   is finalized.
  3888.  
  3889. * BUG: Computer wizards refused to cast Magic Bow if they had double or
  3890.   triple in effect.  Bows and swords are cumulative so it is desirable to
  3891.   cast them with triple.  NOW FIXED by removing CAST_SINGLE from bow.spl.
  3892.  
  3893. * EDITED spell descriptions: Gray Elf, Willy, Arctic Wolf, Gravity, Virtue
  3894.   (btw: why is this spell called Virtue?), Paradigm Shift, Ball Lightning,
  3895.   Emerald Dragon, Battle Cry, Coercion (shouldn't this be called mind blank
  3896.   or something?), Materialize, Meddle.
  3897.  
  3898. * NOTICED: I noticed that some of the spell descriptions have been rewritten
  3899.   to be more succinct.  I like this.
  3900.  
  3901. * BUG: Now that you have shifted the info screen, the stat-highlighting is
  3902.   off since it wasn't shifted to match.  The hotspot was off too. NOW FIXED.
  3903.  
  3904. * BUG: Magic Glass doesn't say "Blocks LOS Enemy Only" on 2nd info screen.
  3905.      FIXED.
  3906.  
  3907. * BUG: a dragon just shot my wizard through a magic glass.  The "l" key shows
  3908.   that the dragon does not have line of sight to my wizard yet he shot him
  3909.   anyway.  The shooting routine (at least for independents) must not be
  3910.   taking into account Line of Sight rules 100%.  The problem turned out to be
  3911.   that the shooting code was checking for LOS like this:
  3912.    if (!isLineOfSight(cell,c) continue;  when it actually is supposed to be:
  3913.    if (!isLineOfSight(c,cell) continue;  FIXED.
  3914.  
  3915. BUG: I saved my game a little while ago with some Magic Glasses on the
  3916. board and now that I reloaded it I find that the reloaded game does not in
  3917. any way resemble the game that I saved.
  3918.  
  3919. BUGS: The filerequester sometimes never goes away.  Sometimes it says it
  3920. loads a game but doesn't redraw the gameboard.
  3921.  
  3922.  
  3923. * CHANGED: Dagger -> Poison Dagger
  3924. * CHANGED: Basilisk ranged weapon to attack movement rating. (Basilisks are
  3925.   supposed to paralyze with their gaze. 8)
  3926.  
  3927. * FLAW: Clicking on Ranged Combat on Info screen of Basilisk or Arctic Wolf
  3928.   does not highlight "Movement" so that you can see that they attack
  3929.   Movement instead of life. FIXED.
  3930.  
  3931. File requester doesn't even have a cancel button or any way of navigating
  3932. dirs.  One time I quit the game and the requester screen was left up even
  3933. after the game had terminated.  In fact, it is still up now, hours later.
  3934. FREAKINDICULAR!!!!!  I just went back to look at it and uhhh... it has
  3935. become exactly like the main game screen!!!!  It looks just like the game
  3936. board!!!!  And it is animated too!!!!  All the creatures are in the same
  3937. place!!!!  WOW!!!!  Holy cowabunga!
  3938. Now I quit the game and the ghost screen has gone blank again like it was
  3939. before I started!  How is this possible???  The ghost screen is still up,
  3940. just completely black.  weirdness...
  3941.  
  3942. The only way this is possible is that both screens were pointing to the
  3943. exact same area of memory.  So each "screen" was simply a different window
  3944. onto the same area of memory.  Mystery solved.
  3945.  
  3946.  
  3947. * Implemented req.library file requester into the game.
  3948.   I've been planning to do this for ages but never had time before.
  3949.   This has the following advantages:
  3950.   1. Easy to use.
  3951.   2. Features high-speed smooth scrolling.
  3952.   3. Features powerful pattern-matching.
  3953.   4. Features directory caching. (YAY!!!!)
  3954.   5. I've been using it for years and it is perfectly reliable.
  3955.   6. No negotiation needed to use it in our products.
  3956.   7. Only 18436 bytes in size.  That's 27,700 bytes smaller than
  3957.      reqtools.library and 22,508 bytes smaller than asl.library.
  3958.  
  3959.  
  3960. STRUCTURE COLLISION!  reqbase.h defines a "FileRequester" structure but so
  3961. does the new asl.h   I am renaming the structure in reqbase.h to be
  3962. "FileRequesterStructure".  Hopefully that will fix everything. 
  3963. reqproto.h modified appropriately.
  3964.  
  3965. I copied the following files:
  3966. copy reqproto.h to include:proto/ clone
  3967. copy reqbase.h  to include:libraries/ clone
  3968. copy req.library to libs: clone
  3969. copy lreqglue.o to lib: clone
  3970.  
  3971. The LoadGame function causes 3 enforcer hits while reading block W.
  3972. Well... now the problem seems to have mysterously vanished.  ??
  3973.  
  3974. I fiddled around with the colors of the requester but never found any
  3975. that I really liked.  I'll leave the selection of colors to whoever wants
  3976. to do it.  I'd like the window border to be dark blue but I don't know
  3977. how to do that.
  3978.  
  3979. PROBLEM: After I've played Chaos for several hours and I'm really tired
  3980. I sometimes select load when I meant to select save.  Sometimes I select
  3981. save when I meant to select load with disasterous results.  Sometimes
  3982. this happens due to tiredness and sometimes due to a less than 100% 
  3983. Right Mouse Button.  So I made the load and save screens noticeably
  3984. different.  PROBLEM SOLVED.
  3985.  
  3986. * PROBLEM, after selecting save then cancel the text at the bottom of the
  3987.   screen is erased so you can't tell whose turn it is. FIXED.
  3988.  
  3989. * NEW FUNCTION VerticalWriteText
  3990.  
  3991. ---------- Resumption of Efficiency Upgrade Speed/Memory -------
  3992. Chaos is currently
  3993.   1288456 / 342808 bytes in size.
  3994.  
  3995. * Edited cmove.tex:
  3996.   1259496 / 342640 Saved  168 bytes in GetWizardWeight
  3997.   1259448 / 342568 Saved   72 bytes in EngageChoice
  3998.   1259432 / 342500 Saved   68 bytes in cMoveEngaged
  3999.   1259360 / 342364 Saved  136 bytes in cMoveNonEngaged
  4000.   1259232 / 342212 Saved  152 bytes in MoveAutomaticallly
  4001.   1259224 / 342180 Saved   32 bytes in cShootScore
  4002.   1259236 / 342140 Saved   40 bytes in cShoot
  4003.   TOTAL SAVED cmove.tex   668 bytes.
  4004.  
  4005. * BUG: Computer controlled archers refuse to shoot things that they don't
  4006.   have Line-of-Sight to.  In other words, computer creatures which have
  4007.   archery ability are never actually _using_ their archery ability. 
  4008.   NOW FIXED.
  4009.  
  4010. * CHANGED: Bolter to have 0 Combat. (Since they can't attack anyway.)
  4011. * CHANGED: Magic Glass to not need line of sight when casting it.  And it
  4012.   can now be cast on corpses too.
  4013.  
  4014. Chaos is currently
  4015.   1316936 / 342152 bytes in size.
  4016.  
  4017. * Edited move.tex:
  4018.   1288092 / 342104 Saved   48 bytes in isEngaged
  4019.   1287028 / 340904 Saved 1200 bytes in Combat
  4020.   1287016 / 340848 Saved   56 bytes in MoveEverybody
  4021.   1286920 / 340640 Saved  208 bytes in SpecialCombatHandler
  4022.   1286812 / 340500 Saved  140 bytes in MoveTempest
  4023.   1286580 / 340212 Saved  288 bytes in Growth
  4024.   1286572 / 340180 Saved   32 bytes in SelectCreature
  4025.   1286584 / 340168 Saved   12 bytes in SayCreatureName
  4026.   1286532 / 340088 Saved   80 bytes in GetNewCell
  4027.   1286184 / 339712 Saved  376 bytes in CrMove1
  4028.   1286160 / 339596 Saved  116 bytes in DoShooting
  4029.   1286164 / 339576 Saved   20 bytes in CrShoot
  4030.   1286136 / 339524 Saved   52 bytes in Killed (Standard Editing)
  4031.   1286096 / 339472 Saved   52 bytes in Killed (Replaced 7 occurences of van_count[loc] with *van_countp)
  4032.   1286108 / 339380 Saved   92 bytes in CanGrow
  4033.   TOTAL SAVED move.tex   2772 bytes
  4034.  
  4035. ******** Memory Efficiency Upgrade COMPLETED (finally) ****************
  4036.  
  4037.  
  4038. * FLAW: After clicking on a flying creature the really cool mouse reporting
  4039.   is turned off so you can't automatically know what your mouse pointer is
  4040.   over.  FIXED.
  4041.  
  4042. * FLAW: After clicking on a ground creature the really cool mouse reporting
  4043.   is sometimes turned off so you can't automatically know what your mouse
  4044.   pointer is over.  FIXED.
  4045.  
  4046. * CHANGED: Inanimate objects are no longer highlighted in the color cycling
  4047.   color when you press the number keys.  Technically, it was correct to
  4048.   highlight them with the color cycling color since their moved bit was not
  4049.   set but since you cannot move inanimate objects or even click on them I
  4050.   decided it was best to have them highlighted like other objects which can't
  4051.   currently be moved (in red). Ditto for growths.
  4052.  
  4053. * CHANGED: Speed spell gives 2 attempts instead of 3.
  4054.  
  4055.  
  4056. ***** BONUS SPELL SELECTION UPGRADE *****
  4057.  
  4058. * Upgraded Bonus spell selection so that you can see what you did to earn
  4059.   the bonus spells.
  4060.  
  4061. * Edited bonus.tex
  4062. * Edited cast.tex
  4063. * Edited prog.tex
  4064. * Edited move.tex
  4065. * Edited all relevant spell files
  4066.  
  4067. * All appropriate code sequences now replaced with a call to the new
  4068.   AwardBonusSpell function.
  4069.  
  4070. * Edited init.tex to initialize the new info properly.
  4071. * Edited io.tex to properly load and save the new info.
  4072.  
  4073. ***** BONUS SPELL SELECTION UPGRADE COMPLETE *****
  4074.  
  4075.  
  4076. * BUG: Pyrotechnics wasn't awarding bonus spells based upon what it killed.
  4077.   It was always awarding the number of bonus spells associated with killing
  4078.   wizards rather than the creature actually killed. FIXED.
  4079.  
  4080. * BUG: Pyrotechnics wasn't awarding points based upon what it killed.
  4081.   It was always awarding the number of points of a wizard's initial life
  4082.   rather than the number of points of initial life of the creature killed.
  4083.   FIXED.
  4084.  
  4085. * CHECKED Storm for the same bug as Pyrotechnics, but it checked out ok
  4086.   with no bugs found.
  4087.  
  4088. * Fixed Team score sorting bug.  The problem was that the scores were being
  4089.   calculated based on team numbers but displayed based on player numbers.
  4090.   It needed to be calculated and displayed based on one or the other.
  4091.   NOW FIXED.
  4092.  
  4093. * BUG: Computer players are casting Magic Castles and Dark Citadels far
  4094.   away from themselves.  FIXED. (This was considered stupid so I just
  4095.   modified isStupidCast to detect this.)
  4096.  
  4097. * CONFUSING: The display of the Team Icon on a Wizard's info screen
  4098.   display. This is no longer needed due to the improved number keys + Team
  4099.   Score display. REMOVED.
  4100.  
  4101. * q key now quits from info panels any other key continues on just like a
  4102.   LMB (Left Mouse Button) press.  Now using the q key RAWKS!
  4103.  
  4104. * BUG: At one point in the music, the lowest note of spectrogram 3 is
  4105.   showing up as the highest note of spectrogram 2.
  4106.   Made a simple 1 channel mod that plays notes from lowest to highest
  4107.   and watched it on my scopes to see if it played correctly.
  4108.   WOAH!  All this time my spectrograms were significantly off!  
  4109.   Spectrogram 1 was ok but spectrogram 2 was off by 4 bytes and spectrogram 3
  4110.   was off by 8 bytes and spectrogram 4 was off by 12 bytes!
  4111.   So basically you just couldn't see the lowest notes in the display.
  4112.   ALL FIXED NOW.
  4113.  
  4114. * REMOVED all support for Oktalyzer music since the Oktalyzer replay code
  4115.   in music.lib was bugged and couldn't play my >64k samples and since I
  4116.   only had 1 ChaosTheme song that was 8 channels anyway and since I am about
  4117.   to finalize the "final" 1 meg version of the game.
  4118.   Removed over 50k of assembler source code.
  4119.   music.lib reduced in size from 34780 -> 24112 saved 10668 bytes.
  4120.   This reduced the executable filesize by 14108 bytes.
  4121.   I figure we can better use that 14k for other things right now.
  4122.  
  4123. * Implemented "Instrument Flashing" into Music.lib asm code.  This allows
  4124.   us to detect and do something anytime a particular instrument in the music
  4125.   is played.  Its primary purpose is to allow us to animate something to
  4126.   the beat of the music. (The quadrascope and spectrograms work by channels
  4127.   not by instruments.)
  4128.  
  4129. * Implemented monster dancing for song 1. I finally got "Instruemnt Flashing"
  4130.   working for Monster Dancing but now I see that the OS DrawImage routine is
  4131.   soooooo ridiculously slow that I can't even have *1* monster dancing on a
  4132.   25 Mhz 030 without it screwing up and slowing down my jcquadragram.  And
  4133.   on the 7Mhz 000 it looks atrociously bad. 8(  So I am leaving the code
  4134.   intact just not "activating" it until someday when I have time to
  4135.   integrate my new asm gfx routines which are a zillion or two times faster.
  4136.   Oh well, at least I can see that the concept will look fairly kewl.
  4137.  
  4138.   Or we could just convert a few Monster Images from DrawImage format into
  4139.   Sprite format and then just animate the sprites.  That would be vastly
  4140.   faster and would work on any Amiga right now.  Does anyone want to do
  4141.   this?
  4142.  
  4143. * BUG: Selecting QUIT from setup screen I or II causes the game to crash.
  4144.   FIXED by commenting out the code for the QUIT and LOAD gadgets.  This was
  4145.   the easiest and fastest way to fix this problem and it makes the program
  4146.   simpler and easier to understand since now the ONLY way to quit or load the
  4147.   game is from the dropdown menu in the main game.
  4148.   I left all the gadget code intact in init.tex in case you
  4149.   want to use it / fix it in the future. I'm just in a hurry to get the final
  4150.   A500 1 meg, no HD version done at the moment.
  4151.  
  4152. * IMPROVED ChaosDocs.tex a bit.
  4153.  
  4154. ******************* Editor Upgrade *****************
  4155.  
  4156. * FIXED warnings about no prototypes in editor.tex.
  4157. * FIXED the flaw where it still said you were in the editor after you had
  4158.   quit the editor.
  4159.  
  4160. * PROBLEM: I can't tell what my mouse pointer is pointing at when using the
  4161.   level editor because the really cool auto-mouse-reporting feature isn't
  4162.   there 8(.  I just LOVE always knowing exactly what I'm pointing at
  4163.   because A) Some creatures look just alike and B) I don't remember what
  4164.   every spell looks like.  Indeed, this is the main reason I liked using my
  4165.   mini-level editor; I always knew exactly what I was looking at because the
  4166.   computer always automatically told me, no guesswork involved.
  4167.   SOLUTION: I put in auto-mouse-reporting code into editor.tex. YAY!!! 
  4168.  
  4169. * ShiftKeyIsBeingPressed is now a global variable.
  4170. * Enabled keypresses in Main Level Editor.
  4171.   Made several routines:
  4172.   KeypressNumeric(); // Show all creatures on your team.
  4173.   KeypressL(); // Line of Sight
  4174.   KeypressM(); // Move
  4175.   KeypressR(); // Range of shooting weapon
  4176.   KeypressS(); // Shoot (Things you can actually shoot)
  4177.  
  4178. * FIXED the top level of Alt-o menu system to print the name of the actual
  4179.   category that you are pointing at.  (I had always intended my alt-o mini
  4180.   editor to do this but just never got around to it.)
  4181.  
  4182. * Enabled Keypresses even during the Alt-O menus.  Now when you have a list
  4183.   of undead creatures sitting in front of you and you want to pick one that
  4184.   is tough but has a low recovery rate you just press q on each one and look,
  4185.   _then_ you pick the exact one you really want with your mouse. Nifty.
  4186.  
  4187. * This also was a good excuse for me to clean up the HandleIDCMP code a bit.
  4188.  
  4189. * Now the official level editor is good enough that I can quit using my
  4190.   mini-level editor!  In fact, I seriously considered deleting my
  4191.   mini-editor from the source code but I refrained from doing so because
  4192.   once I start implementing a future gigantic, complicated upgrade there may
  4193.   be a period of time during the transition where the official level editor
  4194.   stops working. During such a time I can still use my editor to throw
  4195.   monsters on the screen and test new gfx routines and stuff.
  4196.  
  4197. * New Predicates: isIDspecialcombat, isIDweirdattacker, isIDcastfree
  4198.  
  4199. * New classes of creatures such as "Flying Shooters"
  4200.   "All creatures with weird attacks", "All creatures with special combat",
  4201.   "CAST_FREE Scrolls" and "Spells that require a target".
  4202.  
  4203. * Completely rewrote Info.tex to use pointers to Cell Structures rather
  4204.   than copies of Cell structures.
  4205.   1. This allows the usage of our standard IsDead, IsUndead, IsCloaked and
  4206.      IsScroll macros instead of all that char_stat.stat & XXXX_STAT code;
  4207.      thus making the code a bit easier to read.
  4208.   2. I had to do it so that the level editing code in info.tex could
  4209.      actually change the values of stats.
  4210.   3. Doing this + deleting dead code + making optimizations saved 1972
  4211.      bytes on the smake dev code size.
  4212.  
  4213. * Implemented stat-editing on info panels when brought up from within the
  4214.   level editor (LevelEditorActive==YES).
  4215.   Use the mouse to click on the stat and then enter the new stat right on
  4216.   the screen.
  4217.  
  4218. * MODIFIED COMBAT, RANGED COMBAT, SPECIAL COMBAT GADGETS TO HANDLE UP TO 4
  4219.   CHARS. -15(NULL).
  4220.  
  4221. * BUG: Most recovery rate graphs are not being redrawn when clicking on
  4222.   Combat, Ranged Combat or Special Combat to see what they attack. FIXED.
  4223.  
  4224. I couldn't figure out how to control the color of string gadgets... ???
  4225. It doesn't matter right now but it might in the future.
  4226.  
  4227. * Upgraded CheckHotSpot to handle any size of BoundingBox Structure.
  4228.   (Bounding Box Structures are now terminated with {-1,-1,-1,-1}
  4229.  
  4230. * You can now edit attributes on the 2nd info panel.  Just click on a
  4231.   stat to toggle it.
  4232.  
  4233. * Tested making an attacking, flying, shooting, meditation, mountable set 1,
  4234.   creature generator. Hehehehehee HARHARHAR ROFL!!!!  It actually works!
  4235.   I can fly my DragonNest around the screen attacking and shooting things!
  4236.   And I can mount it and dismount it!!!!  And it emits dragons for me even
  4237.   while my wizard is mounted in it!!!! ROFDL!!!!  The game engine gets an
  4238.   A+ for allowing this to work on the first try!
  4239.  
  4240. * I inserted code for editing Move_Recover and Range_Recover stats
  4241.   into info.c.  Just uncomment 2 lines of code and it will work.
  4242.   flashfind from "" search Move_Recover and uncomment all the other
  4243.   lines of code in other modules and all will work fine whenever you
  4244.   add Move_Recover and Range_Recover stats to the game.  I would have
  4245.   went ahead and added them myself but I wasn't sure how to do it anymore
  4246.   with the new system.
  4247.  
  4248. Ok that's it for this upgrade.  I'll leave the editing of names, scores,
  4249. and spell lists to SAI.
  4250.  
  4251. ****************** End Editor Upgrade *****************
  4252.  
  4253. * FIXED those blocks for Range and Move on info panel. Scooted them down 2
  4254.   pixels.
  4255.  
  4256. * MAJOR FLAW: sometimes the speech doesn't work, sometimes it does... it is
  4257.   completely random.  This affects monster names, creature names, player
  4258.   names, everything...
  4259.   Put breakpoints on SayCreatureName, SayName and Say and then play a test
  4260.   game and figure out what the hell is happening...  I just couldn't find any
  4261.   pattern to the failure of the speech.  At first I thought maybe it was an
  4262.   unmatched say/waitforsay pair but after checking through the game for an
  4263.   hour that just wasn't it.  So then I thought maybe some other sound effect
  4264.   was somehow not releasing the audio.device (like maybe the combat sound
  4265.   effect)  But no that just wasn't it either.  Ok, well I finally found the
  4266.   problem in the Say() function:
  4267.     voice_io.pitch                              = 65 + MSGRandom() & 0xFF;
  4268.   Sometimes this sets voice_io.pitch to a very low number like 21 or 28 etc.
  4269.   Values this low produce no sound in the speech system.
  4270.   Changing the offending line to:
  4271.     voice_io.pitch                              = (UWORD)(65 + (UWORD)MSGRandom() & 0x00FF);
  4272.   still doesn't work... Must be changed to:
  4273.     voice_io.pitch                              = (UWORD)65 + ((UWORD)MSGRandom() & (UWORD)0x00FF);
  4274.   NOW COMPLETELY FIXED.
  4275.  
  4276. * Nowhere did it say what type of value MSGRandom returns, not even in its
  4277.   prototype.  NOW FIXED (int)
  4278.   SAI: In C if a prototype does not designate a return type it is assumed to
  4279.   an int. However, it is generally better to define it anyway.
  4280.  
  4281. ??? Creatures with 0 move and 0 manuverability sometimes are not
  4282. engaged to adjacent enemy creatures.  How is that happening?  It used to be
  4283. that 0 manuverability meant you were automatically engaged to any adjacent
  4284. enemy creature.  Did you change this on purpose?  This is fixed months
  4285. later.
  4286.  
  4287. * FIXED: Pressing Amiga-m or Amiga-n on info screens was clearing the info
  4288.   screen because ANY key triggered going to the next info screen. NOW FIXED by
  4289.   simply ignoring all keys except for q=quit and w,a,tab and return take you
  4290.   to the next info panel.
  4291.  
  4292. * Speeded up line of sight testing by about 30% in many cases.  YAY!
  4293.  
  4294. Well, I haven't added any new asm code in over 2 weeks so its about time
  4295. for:
  4296.  
  4297. * Speeded up SqDistance by 5% (eliminated 8 cycles) asm SqDistance is now
  4298.   over 12x as fast as C SqDistance. YAHOO!
  4299.  
  4300. * Speeded up SqDistance again. (Eliminated 4 cycles on 68000.  68030 cycle
  4301.   count unchanged.
  4302.  
  4303. ********* HIGH-SPEED Vector Graphics Upgrade ****************
  4304. *********              PART I                **************** 
  4305.  
  4306. * Implemented hyper fast sin and cos asm functions. (JCSin and JCCos)
  4307.  
  4308.   James Conwell's FAST Trigonometric Functions.
  4309.   =============================================
  4310.  
  4311.   I could never decide what to call these next 2 functions.
  4312.   I could just call them FastSin and FastCos but that would infer that
  4313.   they do the same thing as sin and cos which they DON'T.
  4314.   These functions have less significant digits than the "real" sin and cos.
  4315.   These functions are MUCH faster than the "real" sin and cos.
  4316.   These functions require the input angle to be measured in units of jams,
  4317.   NOT degrees or radians.  1 jam = 1/4096th of a complete circle.
  4318.  
  4319.    512 jams =  45 degrees.
  4320.   1024 jams =  90 degrees.
  4321.   2048 jams = 180 degrees.
  4322.   3072 jams = 270 degrees.
  4323.   4096 jams = 0 jams = 360 degrees = 0 degrees.
  4324.  
  4325.   btw jams stands for "James' Angular Measurement System".  This system
  4326.   fully utilizes the power of binary integer arithmetic inherent in all
  4327.   CPUs.
  4328.  
  4329.   Since the ABSOLUTELY SMALLEST angle that could ever be graphed on a
  4330.   standard Amiga display is 1/640th of a circle, dividing a circle into
  4331.   4096 equal parts should be far more resolution than needed.
  4332.   Furthermore, it would require the use of the entire width of the screen
  4333.   to graph an angle of 1/640th of a circle, so it is unlikely that we would
  4334.   ever need 1/640th of a circle resolution.
  4335.  
  4336.   These functions derive their speed by:
  4337.   1: Using fast lookup tables.
  4338.   2. Using integer multiplication instead of Floating point Multiplication.
  4339.   3. Using perfectly optimized assembly language code.
  4340.      Only 7 instructions for the whole routine! (And 1 of those is RTS)
  4341.  
  4342.   Note that I overlapped the sin and cos tables so that instead of having 2
  4343.   seperate 8k tables I have only one 10k table.
  4344.  
  4345.   The table size could have been greatly reduced by defining a jam to be
  4346.   only 1/2048th or 1 /1024th of a circle.  But I wanted lots of accuracy to
  4347.   be safe. (Some games and demos allegedly get away with a 256 angles per
  4348.   circle system)
  4349.  
  4350.  
  4351.   TIMINGS for Result = Multiplier * Sin(angle)
  4352.  
  4353.   1 frame = 1/50th second.
  4354.  
  4355.   Processor Clock Rate   Method                         Speed
  4356.   68000     7.15905 Mhz  scm.lib (IEEE double)           206 calls/second
  4357.                                                          4.1 calls/frame
  4358.  
  4359.   68000     7.15909 Mhz  mathieeedoubtrans.library       222 calls/second
  4360.                          (IEEE double)                   4.4 calls/frame
  4361.  
  4362.   68000     7.15909 Mhz  mathtrans.library              1282 calls/second
  4363.                          (Motorola Fast Floating Point) 25.6 calls/frame
  4364.  
  4365.   68000     7.15909 Mhz  JCSin asm code                58000 calls/second
  4366.                          (16 bit precision)             1160 calls/frame
  4367.  
  4368.   68030 +
  4369.   68882 FPU 25 Mhz      mathieeedoubtrans.library      13000 calls/second
  4370.                         (IEEE double)                    260 calls/frame
  4371.  
  4372.   68030     25 Mhz      scm.lib (IEEE double)           1190 calls/second
  4373.                                                         23.8 calls/frame
  4374.  
  4375.   68030     25 Mhz      JCSin asm code                232558 calls/second
  4376.                         (16 bit precision)              4651 calls/frame
  4377.  
  4378.   Time to JUST multiply a double * a double using scm.lib:
  4379.   68030     25 Mhz      scm.lib                        24509 calls/second
  4380.                                                          490 calls/frame
  4381.  
  4382.   84 seconds to do 100000 multiplier * sin(angle) with scm.lib
  4383.    4 seconds to do 1000000 JCSin.
  4384.   43 seoonds to do 10 million JCsin
  4385.   408 seconds to do 10 million  scm.lib double * double
  4386.  
  4387.   So as you can see, even if we are doing simple rotation where we can
  4388.   precalculate value*sin(angle) and then just do double * double in the main
  4389.   loop JCSin is 9.49x as fast!
  4390.  
  4391.   JCSin can calculate the sin of a number and multiply it by a value 9.49x
  4392.   as fast as SASC can _just_ multiply two IEEE double numbers together
  4393.   _without_ any sin calculation!
  4394.  
  4395.   At the time of this writing, Chaos (world's best strategy game) is
  4396.   drawing vector graphics to the screen using the "Precalc IEEE double
  4397.   method" whereby the main loop doesn't need to do any slow sin/cos
  4398.   calcualations.  Nevertheless, rewriting that section of code to use JCSin
  4399.   will increase the speed of the math computations by a factor of 9.49!
  4400.  
  4401.   I put off implementing these routines for a long time because at first
  4402.   Chaos had no vector graphics so I decided to delay until I was ready to
  4403.   implement some vector graphics.  But then one day SAI implemented a
  4404.   roatating vector pentagram and I knew then that I would have to move up the
  4405.   day when I implemented these routines.  That day has come.
  4406.   If we are going to have vector graphics in Chaos then dammit! We are
  4407.   going to have vector graphics just as good as everyone else!
  4408.   I want Chaos Vectors to be just as good as Star Wars, Empire Strikes
  4409.   Back, BattleZone, Tempest, etc.  JCSin and JCCos are a solid first step in
  4410.   that direction.  BTW: I _LOVE_ vector graphics!  I've wanted to program
  4411.   animated vector graphics ever since I first saw an ad for an Apple ][
  4412.   circa 1981 that had some sort of graph plotted on the screen.
  4413.   (Of course this blue graph couldn't move at all, but I didn't know that
  4414.   from looking at the advertisement.)
  4415.  
  4416.   LIMITS:
  4417.   sin and cos values have 15 bits of resolution + 1 sign bit.
  4418.   Multiplier inputs are limited to -16383 to +16383.  This should be WAY
  4419.   WAY WAY more than we really need.
  4420.   Final answer contains 15 bits of resolution + 1 sign bit.
  4421.   This should be WAY more than we need for drawing vector graphics and just
  4422.   the right amount for generating 16-bit sound samples.
  4423.   UNITY=32767
  4424.   Smallest angle = 1 jam = 1/4096th of a circle = about .088 degrees
  4425.   It is totally safe to call these functions with large angles.  It
  4426.   automatically takes care of "wrap-around" angles.  So if you need to add
  4427.   angles up to more than 4096 jams then go right ahead.  It can wrap around
  4428.   several times and still work perfectly.  Beyond that is untested.
  4429.  
  4430.   CONVERSIONS:
  4431.   AngleInDegrees = 360 * AngleInJams/4096
  4432.   AngleInRadians = 2 * PI * AngleInJams/4096
  4433.   AngleInJams = 4096 * AngleInDegrees/360
  4434.   AngleInJams = 4096 * AngleInRadians/2*PI
  4435.  
  4436.   HOW DOES THIS WORK?
  4437.   Well, since it seems that sin and cos are always used in conjuction with
  4438.   multiplying by some number and since floating point multiplication is
  4439.   inherently VERY slow I decided to make a system that could use integer
  4440.   WORDS to do the same thing, only faster.
  4441.  
  4442.   You give these functions a multiplier and an angle measured in jams and
  4443.   you get a result of the sin of the angle multiplied by the multiplier.
  4444.  
  4445.   This should allow us to do high-speed vectors with scaling and rotation
  4446.   of any angle and speed we desire.
  4447.  
  4448. ****************  PENTAGRAM VECTOR UPGRADE **************
  4449.  
  4450. All timing tests performed on A3000/030 @25Mhz with all CPU caches on and
  4451. burst mode activated.  Of course I removed the WaitVblank code for this
  4452. timing test so I could find the absolute speed of the code.
  4453.  
  4454. Original MenuAboutUpdate 10,000 times
  4455.  Entire thing         = 90 seconds =  112 calls/sec = 2.2 calls/frame.
  4456.  
  4457. This means that each call takes about .44 of a frame to execute so that if
  4458. the pentagrams were being drawn in the bottom 1/2 of the screen then it
  4459. should theoretically be fast enough to run at 50 fps on 030 with no flicker
  4460. without being optimized.
  4461.  
  4462. In any case the current speed is nowhere near fast enough for the A500.
  4463.  
  4464.  Just the mathematics = 10 seconds = 1000 calls/sec = 20  calls/frame
  4465.  Just the graphics    = 80 seconds =  125 calls/sec = 2.5 calls/frame
  4466.  
  4467.  
  4468. Upgrade Part 1: Changed WriteMask to 0x08
  4469.  Just the graphics    = 20 seconds ( 4x speed increase)
  4470.  
  4471. Upgrade Part 2: Copy the first pentagram with ClipBlit() instead of drawing a whole new one.
  4472.  Just the graphics    = 18 seconds (Very disapointing speed increase 8(
  4473.  
  4474. Upgrade Part 3: Rewrote Mathematics to use JCSin and JCCos
  4475.  Just the mathematics =  1 seconds (10x speed increase)
  4476.  Just the graphics    = 18 seconds
  4477.  Whole Routine        = 18 seconds
  4478.  
  4479. Upgrade Part 4: Disabled ClipRect
  4480.   LoResRastPortClipRect=rastPort->Layer->ClipRect;
  4481.   rastPort->Layer->ClipRect=0;
  4482.   DID NOT WORK. 8(
  4483.  
  4484.   LoResRastPortLayer=rastPort->Layer;
  4485.   rastPort->Layer=0;
  4486.   WORKED!
  4487.  Whole Routine        = 16 seconds (11 % speed increase)
  4488.  
  4489. Upgrade Part 5: OwnBlitter() DisownBlitter()  FAILED.
  4490.   Attempting to surround all the Draw() commands with
  4491.   OwnBlitter()/DisownBlitter() resulted in a machine lockup.
  4492.   OwnBlitter()/DisownBlitter() do NOT nest.  Any task attempting 2
  4493.   OwnBlitter() with no intervening DisownBlitter() will lock up.
  4494.   (I learned this the hard way but it is documented in the RKM)
  4495.  
  4496. Upgrade Part 6: DoubleBuffering.  AVERTED for now.
  4497.   Since the pentagram drawing routine now takes less than .04 of 1 frame
  4498.   to execute this means that if we draw the pentagrams further than .04
  4499.   of a frame down the screen (10.24 pixels) then we don't need to
  4500.   double-buffer it (Referring to time on 25Mhz 030).  Since the pentagrams
  4501.   are currently about 24 pixels down the screen we should be safe, even on
  4502.   the A500.  But be warned that in a period of high-cpu load multitasking
  4503.   the pentagrams might start to flicker due to not being double-buffered.
  4504.   
  4505. I was having a problem that I had anticipated: The pentagram was
  4506. "degrading" after multiplle rotations due to cumulative round-off error.
  4507. So I fixed it by simply having all rotations based upon the ORIGINAL
  4508. cooridinates of the pentagram. Instead of rotating 23 jams each time, I
  4509. have it rotate 23 jams the first time, then 46, then 69 etc. However,
  4510. this brought up a new problem:
  4511.  
  4512. Trying to rotate the object more than 512 jams (45 degrees) at one time
  4513. causes the pentagram to begin shrinking and expanding randomly.  ????
  4514.  
  4515. This problem is being caused by the fact that JCCos is returning wrong (and
  4516. strange) values beyond 45 degrees / 512 jams.  I can't for the life of me
  4517. see what could be wrong.  AFAICT this is caused by a bug in Devpac when
  4518. assembling large tables.  CodeProbe just freaks out and starts lying to me
  4519. about the contents of registers whenever I try to trace through the code.
  4520.  
  4521. * Made numerous changes to AnimatorAsm.s so that the SASC "asm" command
  4522.   could assemble it...  All was going well but there is a bug in SASC 6.5
  4523.   "asm" that prevents it from using binary numbers in the data sections
  4524.   (Which is very strange since binary numbers work fine in the code sections).
  4525.  
  4526. I am very tired now and have other things I must
  4527. work on.  In the meantime I have used the symmetry of the pentagram to work
  4528. around this problem with a little trick.  When the rotation reaches 512
  4529. jams I reset it back to 0 jams and all works fine.
  4530.  
  4531. * Ok I have now proven for a fact that Devpac is NOT assembling AnimatorAsm
  4532.   correctly.  It is not including about 4k of my sin/cos table for
  4533.   some strange reason.  As soon as I upgrade to a new version or switch to a
  4534.   different assembler all will be working fine.
  4535.  
  4536. * Tried inserting numerous fake labels into the asm data so that there would
  4537.   be <1000 bytes of data between labels but this had no effect. My table is
  4538.   STILL not being included in its entirety. 8(
  4539.  
  4540. * Switched the asm source over to use the A68K assembler (This is the
  4541.   assembler that I have been using on music.lib) version 2.71 1991.  It has
  4542.   the EXACT same bug that Devpac 3.14 1994 has!  This is very strange.  I
  4543.   even increased its hash size to 9999 and its heap to 30,000 but this had
  4544.   no effect.
  4545.  
  4546. * Attempting to switch over to ASM-ONE v1.16 1993.  I used to use v1.08B
  4547.   1991 of this assembler a lot years ago because it has the best user
  4548.   interface. Unfortunately it had certain bugs so I eventually stopped.
  4549.   Trying now: It can't handle the @ sign in fuction names.  It can't handle
  4550.   spaces in dc.w statements.  It can't handle local labels (at least not
  4551.   with \)  Giving up on this. 8(
  4552.  
  4553. * BREAKTHROUGH!  Using A68K assembler I have just found that if I remove
  4554.   the 14 blank spaces in my dc.w lines that it then includes an extra 16
  4555.   bytes of my table data!  This means that it _should_ include the whole
  4556.   table if I just eliminate all the blank spaces!
  4557.   Unfortunately it didn't work out quite like that.  It included MOST of the
  4558.   data but not all. 8(
  4559.   VERIFIED that Devpac behaves the EXACT same way.
  4560.   After removing the spaces the filesize from devpac went from 17568 to
  4561.   23088. (It included more of the table data (5520 bytes))
  4562.  
  4563. * FINAL REPORT on Devpac Bug: As far as I can tell, it was only including
  4564.   the FIRST data item on each line. I had 8 data items on each line so only
  4565.   1/8th of the table was really being included.  Thus when I rotated the
  4566.   pentagram 45 degrees I was _really_ rotating it 360 degrees which would
  4567.   explain why it looked so smooth when I reset to 0. This is all AFAIK.
  4568.  
  4569. * Reassembled the code using 1 number per line in the DC.W and now JCSin
  4570.   and JCCos are working perfectly!!!!!! YAHOO!
  4571.  
  4572. * Added some extremely simple 3D rotation to the pentagram.
  4573.  
  4574. ***** END PENTAGRAM UPGRADE ****
  4575. ******** END HIGH-SPEED Vector Graphics Upgrade *************
  4576. ********            END  PART I                 *************
  4577.  
  4578. * Edited asm Getxy to save 2 cycles on 68000.  68030 cycle count unchanged.
  4579. * Edited asm AnimatorAsm to save 6 cycles.
  4580.  
  4581. * Disabled clipping on quadrascopes + quadspectrogram for small speed gain.
  4582.  
  4583. * Time to execute 100,000 DrawImage(FaunID) on 25Mhz 030 + 7Mhz Blitter
  4584.   with clipping enabled  63 seconds
  4585.   with clipping disabled 57 seconds (9.5% faster)
  4586.  
  4587.   Time to execute 100,000 DrawImage(DarkPowerID) (Chosen because it has lots of color) 
  4588.   with clipping enabled  72 seconds (27.7 calls per frame)
  4589.   with clipping disabled 66 seconds (8% faster) 25Mhz 030 + 7Mhz Blitter
  4590.  
  4591.   Time to execute 100,000 DrawImage(DarkPowerID) to an unaligned memory location.
  4592.   with clipping disabled 70 seconds (6% slower) !!!  This means DrawImage
  4593.   is terribly inefficient.  If it was efficient then an unaligned drawing
  4594.   would take 50% longer or more.
  4595.  
  4596.   Time to execute 100,000 "Highlight a cell" on 25Mhz 030 + 7Mhz Blitter
  4597.   with clipping enabled  118 seconds
  4598.   with clipping disabled  97 seconds (19.5% faster)
  4599.  
  4600.   Remember these speed improvements will be much greater on a 68000 because
  4601.   it does math much more slowly and because the blitter is the same speed
  4602.   on both systems.
  4603.  
  4604. * Disabled clipping during the AnimatorTask for about an 8% speed boost on
  4605.   030 (should be at least a 24% speed boost on 68000) The A500 version
  4606.   needs as much speed as possible.  A mysterious blue line has now appeared
  4607.   on the left hand side of the board to mark the edge. ???  I think my
  4608.   Amiga has become sentient and is trying to help me design the game on its
  4609.   own initiative. 8)
  4610.  
  4611. * OOPS! With no clipping, when you are using the drop down menus the
  4612.   animated monsters overwrite them.  Ok, I have sort of fixed this by using
  4613.   the MENUVERIFY feature of the OS.  Unfortunately there are so many
  4614.   different places that handle IDCMP messages now that it is causing a
  4615.   problem.  I have only fixed the main HandleIDCMP routine for now.
  4616.   SAI: This fix is what is causing problems to menus. See later.
  4617.  
  4618. * Ok, I have now modified all those keypresses that highlight cells to
  4619.   temporarily disable the menus.  EVERYTHING IS WORKING PERFECTLY NOW.
  4620.  
  4621. * REMEMBER THIS: The animator Task has proven itself to be safe therefore
  4622.   it is disabling the OS clipping to get a speed boost.  Therefore; we are
  4623.   now using MENUVERIFY so that before any menus are drawn we can stop the
  4624.   animator from running (to keep it from drawing over the menus).  This
  4625.   means any time you are going to parse messages from the IDCMP from "window"
  4626.   You MUST be prepared to deal with this by either correctly handling
  4627.   MENUVERIFY (see HandleIDCMP for an example) or just disable the menus or
  4628.   just turn off the MENUVERIFY feature via ModifyIDCMP();
  4629.   I know this is something of a hassle but this programming technique was
  4630.   going to be neccessary eventually anyway for the day when I put in my
  4631.   asm gfx routines which simply don't know anything about clipping or menus
  4632.   or such things.
  4633.  
  4634. * REMEMBER THIS: Do not ever disable the OS clipping for any routine unless
  4635.   you are ABSOLUTELY sure that it NEVER will EVER write outside the bounds of
  4636.   the rastport.
  4637.  
  4638. * About, New, Quit etc. (things in menu.tex) should get a lock on the board
  4639.   first to keep the animatortask from overwriting the display. FIXED.
  4640.  
  4641. * Changed xpixel[] and ypixel[] arrays to be arrays of UWORDS instead of
  4642.   ints.  UWORDS are faster and take only half the memory of ints. Adjusted
  4643.   C + asm code accordingly.
  4644.  
  4645. * Disabled clipping in DoTheHighlighting() and Highlight() to get the 19.5%
  4646.   speed boost. 
  4647.  
  4648. * BUG: smake release version freaked out on alt-o in official level editor
  4649.   due to backupboard not being allocated.  FIXED.
  4650.  
  4651. * New option: smake demo.  Allows us to manufacture a demo version of the
  4652.   the game with no loading, saving or level editing.
  4653.  
  4654. * #IFDEF all loading and saving code.
  4655.   #IFDEF'ed all calls to LoadInit, SaveGame, LoadGame and LoadLevel.
  4656. * #IFDEF'ed all level editor code.
  4657. * #IFDEF'ed all the file requester code in menu.tex.
  4658. * #IFDEF DEMO a check for turn 20 and quit the game.
  4659. * Removed io.o and editor.o from smake demo linking
  4660.  
  4661. * Attempting to edit, load or save produces the message "Removed from DEMO
  4662.   version.  Please register."
  4663.  
  4664. * CHANGED: The level editor is no longer mentioned anywhere in the docs or
  4665.   the game due to the fact that it isn't completed yet, etc.
  4666.  
  4667. * Solved the mystery of accessing NEAR C variables from asm.
  4668.  
  4669. * Rewrote DoTheHighlighting in asm for a 9.28x speed increase.  I want the
  4670.   game to respond instantly to the player's commands.
  4671.  
  4672. * Old C DoTheHighlighting could only highlight 20.6 cells per frame (and
  4673.   this speed includes the "turn off the clipping" trick.)
  4674.   New Asm DoTheHighlighting always highlights 191.1 cells per frame.
  4675.   9.28x faster!  This should be a full 10x faster on most Amiga systems
  4676.   because most Amigas have their graphics.library in the kickstart ROM but
  4677.   my A3000 loads kickstart into FastRAM.  ROM chips are very slow compared to
  4678.   ram chips. Plus my fastram is compatible with Burst Mode CPU accesses
  4679.   which I don't think any ROM chips support.
  4680.  
  4681. * Rewrote KeypressR() to use DoTheHighlighting(); so it can take advantage
  4682.   of the enhanced speed like the other keypresses.
  4683.  
  4684. * Implemented Lissajous Squares Quit Menu thingy.  I did this for the
  4685.   following reasons:
  4686.   1. I wanted to do a really kewl requester.
  4687.   2. I am vaguely planning to play a different piece of music on each
  4688.      requester in menu.tex; therefore, I need all the requesters to be
  4689.      silent so as not to interfere with the music.
  4690.   3. Amiga color-cycling RULEZ!
  4691.  
  4692.   FEATURES:
  4693.   1. Looks kewl.
  4694.   2. 31 colors are cycled.
  4695.   3. Just when you think it is going to shoot off the screen it arcs around
  4696.      and comes back.
  4697.   4. Fast.
  4698.   5. Smooth.
  4699.   6. Infinite variety. (Only the first one is the same each time, after
  4700.      that they are randomly generated.  Zillions of different designs.)
  4701.   8. Utilizes Asm TestPixel, JCSin and JCCos.
  4702.  
  4703. * We can now turn on/off the color cycling of the lores screen with the
  4704.   variable LoResColorCycling.  e.g. LoResColorCycling=OFF; turns it off.
  4705.  
  4706. * Minor touchups on Setup Screen I
  4707. * Edited description of Reflector.
  4708. * Replaced "New Game" requester with Lissajous Squares version.
  4709.  
  4710. * Monday June 1, 1998 19:01:42 attempting a "smake demo" with stripdebug and
  4711.   optimize. Finished 19:29:13 WOW!  It took less than 30 mins on my 25Mhz
  4712.   030!  The optimizer reduced the max codesize from 305192 to 293044.
  4713.   But the final filesize is 328608.  Hmmm.... I guess that means we have
  4714.   35K of graphics in the source code?
  4715.  
  4716. * Changed default spell list to 99.  Thus anyone playing the demo version
  4717.   will definitely see lots of spells that they never get a chance to cast.
  4718.   hehehehe.
  4719. * Other miscellaneous bugfixes.
  4720. * Edited docs to include info about the demo version.
  4721.  
  4722. * BUGS: The Bonus Spell Window and the "Demo Over Window" are being
  4723.   overwritten by the animator task. FIXED.
  4724.  
  4725. * Reduced the length of a demo game to 18 turns because I played a test
  4726.   game and I won in about 15 turns due to Classic mode giving me lots of
  4727.   tough creatures to squash the independents with. (I was controlling 2
  4728.   wizards against 4 generators.)
  4729.   I seriously considered reducing it to 16 turns but I just can't decide...
  4730.   How long should it be?  What is your opinion?  10 turns?  18?  15???
  4731.   SAI: The demo needs to be long enough that people will get hooked onto
  4732.   some of the more strategic aspects of the game. Therefore, I think
  4733.   that it is ok to be able to win in demo mode. Maybe 15 turns would be
  4734.   good.
  4735.  
  4736. * BUG: The demo version of the game crashes when you try to exit the
  4737.   "Demo Over Window".  Calling TerminateChaos is the problem.  FIXED by
  4738.   making a new function QuitChaos() that can quit the game without crashing.
  4739.  
  4740.  
  4741. Tuesday, June 2nd, 1998.  I have made a smake demo of the game and played
  4742. it a few times on my A3000.  Everything works fine.  But when I put it on
  4743. an autobooting disk and try to play it on my A2000 w/68000 and OS 1.3 it
  4744. always crashes with a guru #00000000004 Illegal Instruction.
  4745. I thought this might be caused by the SASC optimizer bug but I have now
  4746. recompiled without the optimize parameter and it still does the same thing.
  4747. I can't find the autobooting version that I made back at christmas time. 8(
  4748. Do you still have it?  Maybe I am doing something different on this disk
  4749. that is causing things not to work.  I just don't know.  The problem should
  4750. be one of the following:
  4751. 1. SASC bug that is generating an 020+ instruction somewhere. (possible)
  4752. 2. Devpac bug that is generating an 020+ instruction somewhere. (doubtful)
  4753. 3. A68K asm bug that is generating an 020+ instruction somewhere. (possible)
  4754. 4. Not really an illegal instruction but merely a wrong file on the
  4755.    autobooting disk.
  4756. 5. Not really an illegal instruction but merely a missing file on the
  4757.    autobooting disk.
  4758. I am testing on an A2000 with 1 meg chip + 8 megs fast so I don't think
  4759. memory is the problem.
  4760.  
  4761. * OK I found the problem.  I didn't have the "run" command on the
  4762.   autobooting disk.  Execute(); requires run to be in the c: dir.
  4763.   Well luckily I only wasted an hour trying to figure that out.
  4764.  
  4765. Ok, now the intro isn't running... the fonts aren't loading...
  4766.   3 hours later ... after much trial and error I have it all working, geez
  4767. I am going to hafta document this autobooting disk format for future
  4768. reference.  Every time I make an autobooting disk I have these problems...
  4769.  
  4770. * Ok the game is now working on the 7Mhz 68000 but for some reason when you
  4771.   select a team all the checkmarks on setup screen I are redrawn.  This
  4772.   totally stops the quadrascopes for a second...
  4773.  
  4774. * Observations about playing the game on 7Mhz 68000:
  4775.   1. l key for line-of-sight is still too slow.  It can take up to 3
  4776.      seconds.  The days of the 7Mhz 1978 68000 are at an end.
  4777.   2. The r for range and m for move are nice and fast.
  4778.   3. The s for shoot was somewhat adequate.
  4779.   4. The quadrascopes move slower than what I am accustomed to.  Its a
  4780.      damn good thing I removed the OS clipping from them.
  4781.   5. The Color cycling on the "new game" and "quit game" requesters is much
  4782.      slower but this actually makes it look better IMHO.
  4783.   6. The left pentagram blinks noticeably.  So much for getting away with
  4784.      no double buffering.  The right pentagram is nice and solid.
  4785.  
  4786. * ChipRam  availabilty for Chaos v2.3d on a 512k chipram system:
  4787.   During the Intro:          55008 bytes free!  yeah!  We made it!!!!
  4788.   During Setup Screen I:     63848 bytes free!
  4789.   During main game:         256200 bytes free!
  4790.   During Information panel: 242200 bytes free!
  4791.   During Quit Requester:    205400 bytes free!
  4792.  
  4793.   We are currently using 380k of fastram. (So v2.3f should be about 440k)
  4794.  
  4795.   These numbers mean that as soon as I start work on the sound and music
  4796.   upgrade the game will require 1 meg of chipram or more + 1 meg of fastram
  4797.   or more.
  4798.  
  4799. * I have now tested this OS 1.2 Autoboot Disk on an OS 3.0 stock A1200 in
  4800.   both ECS and AGA modes and it doesn't work due to incompatibilities with
  4801.   the OS versions of various libraries and cli commands.  We will have to
  4802.   make a separate autoboot disk for at lest the 2 major versions of the OS.
  4803.  
  4804.  
  4805. ******************** AUTOBOOTING DISK FORMAT ******************************
  4806. ===========================================================================
  4807.  
  4808. * Documentation for making an Autobooting floppy disk version of the game:
  4809.   The disk must contain the following files in the following directories.
  4810.   They are ALL REQUIRED.
  4811.   I'm not on the internet right now or I would download one of those nifty
  4812.   dirtree utils.  Oh well, I'll just include a complete directory listing.
  4813.  
  4814. The docs may be placed in the root directory along with an icon and the
  4815. "more" command if there is room for it all.
  4816.  
  4817. Directory "df2:" on Sunday 07-Jun-98
  4818. libs                         Dir ----rwed Tuesday   09:58:44
  4819. s                            Dir ----rwed Tuesday   11:02:11
  4820. c                            Dir ----rwed Tuesday   10:54:40
  4821. devs                         Dir ----rwed Tuesday   05:22:12
  4822. l                            Dir ----rwed Tuesday   05:23:30
  4823. Chaos                        Dir ----rwed Wednesday 02:18:06
  4824. Chaos.info                   drawer icon for dragging onto harddrive.
  4825. 6 directories - 12 blocks used
  4826.  
  4827. Directory "df2:libs" on Sunday 07-Jun-98
  4828. diskfont.library            4964 13-Aug-88 For access to fonts.
  4829. translator.library         10592 13-Aug-88 For the computer voice.
  4830. req.library                18436 07-Jul-93 For the awesome filerequester.
  4831. 2 files - 71 blocks used
  4832.  
  4833. Directory "df2:s" on Sunday 07-Jun-98
  4834. Startup-Sequence             158 -s--rwed Tuesday   11:02:11
  4835. 1 file - 2 blocks used
  4836.  
  4837. Directory "df2:c" on Sunday 07-Jun-98
  4838. run                         2568 30-May-78 for Execute();
  4839. assign                      3008 30-May-78 to assign the Chaos_Game: path
  4840. FastMemFirst                 976 --p-rwed 30-May-78 16:28:46
  4841. SetPatch                    3844 30-May-78 for OS patches
  4842. Add36k                       648 13-May-92 To save 36k of chipram.
  4843. cd                          1756 30-May-78 To assign the Chaos_Game: path
  4844. avail                       1964 --p-rwed 30-May-78 16:27:15
  4845. list                        9972 --p-rwed 30-May-78 16:28:02
  4846. more                       16912 ----rwed 13-Mar-78 10:34:23
  4847. 9 files - 95 blocks used
  4848. list, avail and more are not required at this time.  I just like to use
  4849. those commands a lot so I always put them on my disks.  FastMemFirst isn't
  4850. strictly required either; I just figured it was a good idea.
  4851.  
  4852. Directory "df2:devs" on Sunday 07-Jun-98
  4853. System-Configuration         232 13-Aug-88 For default 80-column display
  4854. ramdrive.device             2128 13-Aug-88 for the RAM: drive
  4855. narrator.device            23280 13-Aug-88 For the computer voice.
  4856. 3 files - 55 blocks used
  4857.  
  4858. Directory "df2:l" on Sunday 07-Jun-98
  4859. Ram-Handler                 6464 13-Aug-88 for the RAM: drive
  4860. Speak-Handler               4216 13-Aug-88 for the computer voice
  4861. 2 files - 24 blocks used
  4862.  
  4863. Directory "df2:Chaos" on Sunday 07-Jun-98
  4864. fonts                        Dir ----rwed Tuesday   10:17:13
  4865. Music                        Dir ----rwed Tuesday   10:26:42
  4866. Chaos                     328764 ----rwed Wednesday 02:15:39
  4867. chaos.prb                   6729 ----rw-d 14-Apr-98 20:37:19
  4868. classic.prb                 6471 ----rw-d 14-Apr-98 20:37:20
  4869. pool.ssc                   42319 ----rwed Monday    19:12:31
  4870. Start_Chaos                  311 ----rwed 31-Mar-98 05:49:42
  4871. Start_Chaos.info            2566 ----rwed 31-Mar-98 05:49:43
  4872. chaos.dat                  66368 ----rwed Monday    19:15:43
  4873. 7 files - 2 directories - 901 blocks used
  4874.  
  4875. Directory "df2:Chaos/fonts" on Sunday 07-Jun-98
  4876. chaos.font                   264 ----rwed 01-Apr-98 22:23:30
  4877. chaos                        Dir ----rwed 01-Apr-98 22:23:29
  4878. Union.font                   524 ----rwed 31-Mar-98 05:51:22
  4879. Union                        Dir ----rwed 31-Mar-98 05:51:22
  4880. 2 files - 2 directories - 9 blocks used
  4881.  
  4882. Directory "df2:Chaos/fonts/chaos" on Sunday 07-Jun-98
  4883. 8                           1724 ----rwed 01-Apr-98 22:23:29
  4884. 1 file - 5 blocks used
  4885.  
  4886. Directory "df2:Chaos/fonts/Union" on Sunday 07-Jun-98
  4887. 34                          5972 ----rwed 31-Mar-98 05:51:22
  4888. 70                         21948 ----rwed 31-Mar-98 05:51:22
  4889. 2 files - 57 blocks used
  4890. Both sizes of the Union Font are used in the game.
  4891.  
  4892. Directory "df2:Chaos/Music" on Sunday 07-Jun-98
  4893. Mod.ChaosTheme1           192226 ----rwed 01-Apr-98 22:38:40
  4894. 1 file - 377 blocks used
  4895.  
  4896. TOTAL: 31 files - 10 directories - 1608 blocks used
  4897.  
  4898.  
  4899. The startup-sequence should look something like this:
  4900. c/add36k
  4901. c/SetPatch >NIL: ;patch system functions
  4902. c/FastMemFirst ; move C00000 memory to last in list
  4903. c/assign t: ram:
  4904. c/assign c: c/
  4905. c:cd chaos/
  4906. c:run chaos
  4907.  
  4908. ******************** END AUTOBOOTING DISK FORMAT **************************
  4909. ===========================================================================
  4910.  
  4911. I just played a test game of the demo version on my A2000 and at one point
  4912. a computer wizard was killed by a fire and the WizardExplode effect started
  4913. then the game crashed with a guru #000004.
  4914.  
  4915. I played another test game on my A2000 and this time the game crashed when
  4916. a bolter wall shot my wizard and killed me.  The WizardExplode effect
  4917. started and then the game crashed.
  4918.  
  4919. This is quite strange because I've played several test games on my A3000
  4920. and I have killed lots of computer wizards with no crashes.  I have even
  4921. killed several wizards on the A2000 and not had any crashes.
  4922.  
  4923. This bug is probably being caused by either
  4924. A: clipping is somehow turned off during the wizardexplode effect and when
  4925.    the effect goes off the edge of the screen it crashes the game.  But if
  4926.    this were true then it should crashe EVERY time a wizard dies, not just
  4927.    some of the time.
  4928. B: It is a bug that affects all wizards killed by fire or any human wizard
  4929.    that dies in any way.
  4930. Never mind the above paragraphs; all is fixed now. Read next paragraph.
  4931.  
  4932. * BUG: game sometimes crashes when WizardExplode effect reaches edge of
  4933.   screen.  FIXED by getting a lock on the board while doing the effect.
  4934.   This ensures that clipping is turned on.
  4935.  
  4936. * As a general rule, graphical effects should get a lock on the board just
  4937.   to prevent graphics mish-mash.  And they should get a lock on the board
  4938.   in case the effect writes past the edges of the screen.  If an effect
  4939.   doesn't get a lock then clipping might at that moment be on or off.
  4940.   Getting a lock ensures that clipping is in it's default state (ON).
  4941.  
  4942. * BUG: sometimes computer players get to move twice.  Independents never seem
  4943.   to be able to move twice though.  This bug never seems to happen until
  4944.   after some wizards have died. NOW FIXED.
  4945.  
  4946. * BUG: The speech always seems to work during casting phase but it seems to
  4947.   only work randomly during movement phase.  Hacking more changes to Say()
  4948.   in an attempt to make this problem go away.
  4949.  
  4950. * OK I think I found the speech bug: an intervening use of text_store
  4951.   between say() and waitforsay().  Tested and the speech is working 100%
  4952.   now.
  4953.  
  4954. * Made various changes to print what is being said first, then actually
  4955.   saying it.  Thus you can read what it is saying for the 2 or 3 seconds
  4956.   that it is saying it.
  4957.  
  4958. * CHANGED Aerial Servant and Combat to be CLASSIC.
  4959.  
  4960. * BUG: Spriggan speech doesn't work. Allegedly FIXED by removing the "2"
  4961.   from the end of the speech.
  4962.  
  4963. * Speeded up TestPixel.  Saved 4 cycles on 68000 or 2 cycles on 68030.
  4964. * TestPixel is now known as TestPixel4.  It tests the first 4 bitplanes of
  4965.   any rastport.
  4966. * Made new TestPixel1 Routine which only tests the first bitplane of a
  4967.   rastport.  I needed this routine for various purposes.
  4968.  
  4969. * Put in some checksums for lamer protection.
  4970.  
  4971. * BUG: Any errors in the early startup phase (e.g. it can't open a certain
  4972.   file) result in a crash.  NOW FIXED.
  4973.  
  4974. Now that I know we have enough chipram laying around...
  4975. * CHANGED: the default font for the game to be pearl.font (now included
  4976.   in the fonts/ dir.)  I did this for 3 main reasons:
  4977.   1. Games which use the standard topaz font always seem "cheap" compared
  4978.      to games which use their own custom font.  It just somehow feels more
  4979.      "commercial" when you play a game with a font different than the one
  4980.      you are used to looking at all the time.
  4981.   2. The lowercase i of Topaz sucks.
  4982.   3. I have tested many, many fonts to find the one which is the easiest to
  4983.      read.  And pearl is it.  I have had pearl.font as the default font on
  4984.      my Amiga for several years now.  It just makes everything easier to
  4985.      read.  _Especially_ 640x512 resolution text which is the resolution
  4986.      that I run everything in.  I realize that Chaos does not currently use
  4987.      that high a resolution but I just tested several fonts a few mins ago
  4988.      against pearl in 640x256 mode and I could still see the difference.
  4989.  
  4990. * SMOOTHED out the outlining of the Large font during the intro.  The
  4991.   outlining used to appear blocky on certain letters.  Now the jagged edges
  4992.   are rounded off.  This has the drawback of almost doubling the execution
  4993.   speed of FancyWriteText but the slowness will really only be noticeable on
  4994.   the 7 Mhz 68000 and for UAE lamers.  Oh well.... too bad for them...
  4995.  
  4996. * STUPID: Computer wizards cast Ball Lightning on a Generator which
  4997.   already had 0 combat. NOW FIXED.
  4998.  
  4999. * STUPID: Computer wizards cast Demonic Touch on other wizards who only
  5000.   had 1 combat point. NOW FIXED.
  5001.  
  5002. * ADDED: Stupidity checking for Shocker.
  5003. * IMPROVED: Stupidity checking for Archery.
  5004.  
  5005. * BUG: The "Wings" mouse Pointer and the "X" mouse pointer became
  5006.   corrupted at one point.  This was possibly caused by a wizard dying in the
  5007.   upper left corner or by another wizard dying by being covered with a
  5008.   growth.  I _think_ I fixed this but I don't really know.
  5009.  
  5010. * BUG: FLAG_NOWIZARDCELL is broken.  Wizards routinely cast spells like
  5011.   Subversion and Betrayal, etc. on creatures which have mounted wizards.
  5012.   NOW FIXED.
  5013.  
  5014. * BUG: That silly clipping bug has reappeared again!  I don't get it.  Now
  5015.   the WizardExplode effect is not working again. Argh. It is drawing
  5016.   Wizards all throughout chipram... they circle around over and over again
  5017.   at an angle on the LoRes Screen and they bleed over into the HiRes screen
  5018.   and they even pour out into the workbench screen and the CPR screen!
  5019.   I have verified that
  5020.   rastPortLayer and rastPort->Layer are somehow both set to 0 before this
  5021.   function is called.  ???? .... 3 hours later... Ok, I figured it all out.
  5022.   I had made a change at the beginning of start.tex to derive the variable
  5023.   "rastPort" from the lores screen.  But doing that gives a pointer to a
  5024.    rastPort with no cliprect and no layer information.  We must derive the
  5025.   global variable "rastPort" from the backdrop window (which is how you had
  5026.   it set up all along until I changed it in ignorance of this behavior).
  5027.   ALL FIXED NOW!
  5028.  
  5029. * The above fix has apparently made that mysterious blue 1-pixel line on
  5030.   the left edge of the screen go away.
  5031.   SAI: This line periodically appeared for me during my test games, but
  5032.   I was unable to determine the exact circumstances.
  5033.   JC: I think it is something do with layers.library and enabling/disabling
  5034.   OS Clipping.
  5035.  
  5036. * STUPID: My allied wizard just cast a pool far away from himself and right
  5037.   up next to his enemy's base camp. FIXED.
  5038.  
  5039. * STUPID: Wizards sometimes cast Magic Wood trees directly adjacent to
  5040.   enemy wizards. FIXED.
  5041.  
  5042. * NEW FUNCTIONS: IsAdjacentEnemyWizard(Cell *), IsAdjacentTeamWizard(Cell *)
  5043.  
  5044. * LESS THAN INTELLIGENT: Computer wizards only cast castles directly
  5045.   adjacent to themselves, they never cast castles across the screen to be
  5046.   adjacent to one of their allies.  NOW FIXED and totally cool.
  5047.  
  5048. * MAJOR BUG: I just moved my Aerial Servant onto a Mass Resurrect Scroll.
  5049.   Then somebody justiced my servant and killed it and I guess it "reinstated"
  5050.   the scroll.  Anyway there is now a weird creature whose 3 frames of
  5051.   animation are Lion, Dead Lion, Mass Resurrect Scroll.  It's stats are
  5052.   totally freaked out with numbers like 78 and -78. It eats Hydras, it's
  5053.   Mountable Set 1 and it's a flying meditation growth that can attack both
  5054.   living and undead creatures. Weird stuff. The mouse thinks it is a Mass
  5055.   Resurrect scroll that belongs to me, therefore its movement bit doesn't get
  5056.   cleared so I can't click on it and move it.  darn. I didn't have time to
  5057.   try to mount it.  I wonder what would have happened?      NOW FIXED.
  5058.  
  5059. * FLAW: I tried to cast my python on a Ghost scroll and it said "Cannot cast
  5060.   on Creatures" rather than the more appropriate "Cannot cast on Scrolls"
  5061.   FIXED.
  5062.  
  5063. * BUG: A Faun Scroll just put my Ghoul to sleep! FIXED.
  5064.  
  5065. * BUG: Dark Powering a snake that is standing on a scroll kills the snake and
  5066.   makes the scroll disappear.  FIXED.
  5067.  
  5068. * BUG: Creature died on scroll.  Scroll was still there.  I collected the
  5069.   scroll and moved away but the corpse was not there anymore!  THIS IS NOT A
  5070.   BUG, JUST A LIMITATION OF THE GAME, sorry.
  5071.  
  5072. * BUG: snake stands on dead vampire.  Justice Snake regenerates a living
  5073.   vampire rather than an undead vampire.  ERADICATED.
  5074.   SAI: I actually knew about this, thought it would be a good trap for
  5075.   young players :-)
  5076.   JC: Yeah, I went back and reread this section a few weeks after I changed
  5077.   this and I thought to myself: "Hmmm... maybe I shouldn't have done that?
  5078.   Oh well, its done now."  Should we make some sort of rule about this?
  5079.  
  5080. * BUG: Play a game with 99 scrolls.  Start a new game.  After ScrollDelay
  5081.   turns NOBODY is awarded jillions of spells from many (but not all) blank
  5082.   spaces on the board.  Traced this to a problem in ClearBoard(); NOW FIXED.
  5083.  
  5084. * BUG: Generator Scroll just generated a Hydra.  This was so hilarious that I
  5085.   almost left this bug in the game... oh well, I FIXED it.
  5086.  
  5087. * BUG: I was riding a unicorn and I cast reincarnate on my unicorn.
  5088.      I was surrounded by enemy monsters, they killed my unicorn and it
  5089.      reincarnated into a spider then they killed the spider and it became
  5090.      a beetle then a goblin killed the beetle and stepped onto the square!
  5091.      I could still cast spells but I couldn't dismount the independent
  5092.      goblin.  This goblin also had an identity crisis; each turn when I
  5093.      clicked on the "end turn" gadget; this goblin would attack independent
  5094.      creatures for me all on its own.  But when it was the
  5095.      Independent's turn it would act like an independent goblin and attack
  5096.      my creatures.  I made a small correction to Reinstate() and tested it
  5097.      so this is NOW FIXED.
  5098.  
  5099. * BUG: I killed 5 things with my WoodElf and it sure enough became a
  5100.   DreadElf but it belonged to NOBODY!  FIXED.
  5101.  
  5102. * BUG: I killed 7 things with my GreenDragon and it became an Emerald
  5103.   Dragon belonging to NOBODY.  FIXED.
  5104.  
  5105. * BUG: I killed 20 things with my RedDragon but it didn't give me a Vampire
  5106.   Spell.  FIXED.
  5107.  
  5108. * NOTICED: that due to all of our code cleanups, the Vortex no longer
  5109.   leaves a trail of distorted space in its wake.  I suppose this is for the
  5110.   best.  I guess we should change the spell description accordingly?
  5111.  
  5112. BUG: Trying to use the menus at the VERY beginning of the game before it
  5113. has time to say "Player 1" results in a machine crash.  Leaving this one
  5114. for SAI.
  5115. SAI: I got a recoverable alert. I have been unable to fix this. I not
  5116. sure why it happens, esp. with the tick menus as they are completely
  5117. controlled by Intuition. Perhaps it is something to do with clipping?
  5118. Jeeps. It even does it if you just use the RMB and don't actually
  5119. select anything! May have found the problem, I was getting timeout
  5120. messages for window events---this is a potential memory leak.
  5121. No, I have now discovered this problem is caused by doing too many
  5122. ReleaseSemaphore operations. Somehow MENUVERIFY is not set at
  5123. this early stage, and therefore the semaphore never gets locked.
  5124. I have patched this problem by checking the semaphore status before
  5125. attempting to release it. This work, but it is technically illegal
  5126. because it makes an assumption about the Semaphore structure. Looking
  5127. at HandleIDCMP it badly needs to rewritten, even has a goto in it
  5128. at the moment! NOW FIXED
  5129.  
  5130. At the beginning of this next upgrade I had already made countless changes
  5131. to every source code file including lots of spell files and even msg.tex so
  5132. I went on ahead and made more changes by implementing the following:
  5133.  
  5134. ***************************************************************************
  5135. ***************** SOURCE CODE READABILITY UPGRADE *************************
  5136. *****************       PART I: PROTOTYPES        *************************
  5137. ***************************************************************************
  5138.  
  5139. * Sunday: Completed Audio.tex through move.tex.  I'll do the rest tomorrow.
  5140. * Monday: Completed through part of prog.tex then had to go to work. 8(
  5141. * Monday Night: Completed through start.tex then passed out.
  5142. * Tuesday Morning: Completed all .tex files + tex2c.c.
  5143.  
  5144. * Replaced all prototypes with complete versions.
  5145. * Eliminated several duplicate prototypes.
  5146. * Various other code cleanups.
  5147.  
  5148. No more Function(int,int,int,int,int);!
  5149.  
  5150. All prototypes replaced with the form of:
  5151. Function(int SourceX, int SourceY, int DestX, int DestY, int iterations);
  5152.  
  5153.  
  5154. ***************************************************************************
  5155. ***************** SOURCE CODE READABILITY UPGRADE *************************
  5156. *****************         PART II: SYNTAX         *************************
  5157. ***************************************************************************
  5158. *****************  NEW PROGRAMMING LANGUAGE: JC   ***********************
  5159. ***************************************************************************
  5160.  
  5161. I got sick of the lameness of C so I invented a new language called JC.
  5162. JC stands for "James' C", "James Conwell" and "GET THOSE GAWDAM FUCKING
  5163. PIECE OF SHIT LAME-ASS BRACES {} OUTTA MY FACE!" 8)
  5164.  
  5165. Have you ever wished C didn't have all those lame curly braces? {}
  5166. Then JC is for you.
  5167.  
  5168. Have you ever wished C had Array Bounds Checking?
  5169. Then JC is for you.
  5170.  
  5171. Have you ever wished C would properly indent your source code for you?
  5172. Then JC is for you.
  5173.  
  5174. Have you ever said "C is the greatest language ever.  Its ease of use is
  5175. remarkable, its syntax is unsurpassed and its execution speed cannot be
  5176. matched by even the best assembly language programmers"?
  5177. Then you are seriously deranged and JC is not for you.
  5178.  
  5179. Here are the specifications for JC:
  5180. 1. It is exactly the same as C, with the following exceptions:
  5181.    A. Braces {} are only used to define Arrays and Structures, or in a case
  5182.       block to create some new temporary variables.
  5183.    B. You can use "and" or "AND" instead of &&.
  5184.    C. You can use "or"  or "OR"  instead of ||.
  5185.    D. IF statements end with END_IF and need not contain any braces {}.
  5186.    E. FOR statements end with NEXT  and need not contain any braces {}.
  5187.    F. SWITCH statements end with END_SWITCH and need not contain any braces.
  5188.    G. DO_WHILE(condition) blocks can end with LOOP or LOOP_WHILE(condition)
  5189.       or LOOP_UNTIL(condition).
  5190.    H. DO_UNTIL(condition) blocks can end with LOOP or LOOP_WHILE(condition)
  5191.       or LOOP_UNTIL(condition)
  5192.    I. Functions begin as usual with the type of return, name of function
  5193.       and parameter list followed by the keyword FUNCTION which begins the
  5194.       FUNCTION block.  The FUNCTION block is terminated by the END_FUNCTION
  5195.       statement.
  5196.    J. You may have a WHILE condition or an UNTIL condition at the top of a
  5197.       loop, the bottom of a loop or both via DO_UNTIL/DO WHILE and
  5198.       LOOP_UNTIL/LOOP WHILE thus you can have a loop like:
  5199.  
  5200.       DO_UNTIL (x<0)
  5201.         blahblahblah();
  5202.       LOOP_WHILE (z!=y and z!=1)
  5203.  
  5204. 2. JC is easily transportable to every computing platform on Planet Earth.
  5205.    (or at least those which have C compilers.)
  5206. 3. JC has the option of properly indenting your source code.
  5207. 4. JC has the option of generating additional code for Array Bounds
  5208.    Checking. (Not yet implemented.)
  5209.  
  5210.  
  5211. Why is C so lame?
  5212. I could write an entire book documenting all the reasons why C is a lame,
  5213. obnoxious, crappy, primitive and barbaric language; however, I will only
  5214. write about those problems which are fixed by using JC.
  5215.  
  5216. I have wasted countless hours trying to debug large, complicated programs
  5217. which are very deep. "Deep" meaning deeply nested ifs within ifs within
  5218. elses within fors within switches right next to other ifs within fors with
  5219. elses within ifs within other switches, etc.
  5220.  
  5221. The reason for my wasted time is simple. The following symbol is nearly
  5222. meaningless "}".  The close brace doesn't tell me jack about what is going
  5223. on in the program.  It's definition is so completely vague that it makes
  5224. reading a program and debugging it very confusing.  } means "end a block of
  5225. code".  Well, whoop-dee-doo.  What the hell kind of block is it
  5226. ending??!?!?!?  _Which_ block of code is it ending?!?!???  You just don't
  5227. know.  It could be ending a FOR block or a SWITCH block or an IF block or
  5228. an elseif block or an ELSE block or ...
  5229.  
  5230. In JC a FOR block is ended with NEXT.  A SWITCH block is ended with
  5231. END_SWITCH.  An IF block is ended with END_IF.
  5232.  
  5233. Thus when you look near the end of a large function instead of seeing this:
  5234.  
  5235.              }
  5236.            }
  5237.          }
  5238.     s=0;
  5239.       }
  5240.    }
  5241. }
  5242.  
  5243. You will be able to see some text that actually has real meaning.
  5244.  
  5245.  
  5246. IF you start a block of code THEN you must end a block of code. This is
  5247. logical, proper and grammatical.  No more constructions like:
  5248. if (x)
  5249.    Blahblahblahblahblah();
  5250.  
  5251. You should rewrite it to be all on one line or like this:
  5252. IF (x) THEN
  5253.    Blahblahblahblahblah();
  5254. END_IF
  5255.  
  5256. This is absolutely neccessary so the JC syntax checker can verify that all
  5257. of your blocks of code match up properly.
  5258.  
  5259. If you don't put an END_IF at the end of your IF block then how will the
  5260. syntax checker know if all your IF blocks line up properly???  It will
  5261. think that you forgot it (which is the purpose of JC, to catch those times
  5262. when you forget something).
  5263.  
  5264. IF you start a block of code THEN you must end a block of code. This is
  5265. logical, proper and grammatical. 
  5266.  
  5267. SHORTCUT exception: You may have SINGLE line IF statements where the ENTIRE
  5268. IF (condition) statement(); is ALL on 1 line.  So you still have a shortcut
  5269. for simple IFs.  This shortcut should OMIT the word THEN or it won't
  5270. compile correctly.  Of course, all multiline IFs must include the THEN
  5271. keyword.
  5272.  
  5273.  
  5274. If you want your IF statement to use more than one line then you MUST use
  5275. END_IF.  That is the rule.  And it makes the program easier to read.  And
  5276. it allows the syntax checker to find those obnoxious bugs in deep code and
  5277. it allows the JC formatter to properly indent your source code.
  5278.  
  5279. END_IF, NEXT and END_SWITCH should be located on a line by itself, as the
  5280. whole purpose of these keywords is to aid human readability and the only
  5281. way we can accomplish this is for the end block markers to stand out from
  5282. the crowd.
  5283.  
  5284. Here are some examples of C code vs. JC code:
  5285. C:
  5286. if (x) DoThis();
  5287.  
  5288. JC:
  5289. IF (x) DoThis();
  5290.  
  5291.  
  5292. C:
  5293. IF (x) {
  5294.   DoThis();
  5295.   DoThat();
  5296. }
  5297.  
  5298. JC:
  5299. IF (x) THEN
  5300.   DoThis();
  5301.   DoThat();
  5302. END_IF; <--- Semicolon optional.
  5303.  
  5304.  
  5305. C:
  5306. IF (x) {
  5307.   DoThis(); DoThat(); DoTheOther();
  5308. }
  5309.  
  5310. JC:
  5311. IF (x) THEN
  5312.   DoThis(); DoThat(); DoTheOther();
  5313. END_IF
  5314.  
  5315.  
  5316.  
  5317. C:
  5318. IF (x){
  5319.   DoThis();
  5320.   DoThat();
  5321.   DoTheOther(parameter1, parameter2, parameter3, xyzzy, plugh, parameterZ, weird);}
  5322.   DoSomethingElse(blahblah);
  5323.   return(returnvalue);
  5324.  
  5325.  
  5326. JC:
  5327. IF (x) THEN
  5328.   DoThis();
  5329.   DoThat();
  5330.   DoTheOther(parameter1, parameter2, parameter3, xyzzy, plugh, parameterZ, weird);
  5331. END_IF
  5332. DoSomethingElse(blahblah);
  5333. return(returnvalue);
  5334.  
  5335.  
  5336. C:
  5337. switch (code) {
  5338.    case 1:
  5339.      blahblah();
  5340.    case 2:
  5341.      blahblah();
  5342. }
  5343.  
  5344. JC:
  5345. SWITCH (code)       <--- Notice there is NO brace! {
  5346.    case 1:
  5347.      blahblah();
  5348.    case 2:
  5349.      blahblah();
  5350. END_SWITCH // (code)
  5351.  
  5352.  
  5353.  
  5354. Given that over 95% of the Earth's literate population does not know what
  5355. "&&" or "||" mean; it utterly boggles the mind to try to conceive why C uses
  5356. "&&" to mean "and" and "||" to mean "or".  Over half the world's literate
  5357. population knows what "and" and "or" mean, and 100% of the Earth's
  5358. English-Speaking population knows what "and" and "or" mean.
  5359.  
  5360. Given that the & is used to derive the address of a variable, to logically
  5361. and bits together AND to mean "and" in the case "&&" we can see that the &
  5362. is really overused so && has been replaced with "and" in JC.
  5363.  
  5364. Ditto for || and "or".
  5365.  
  5366. Of course now that I have been seriously coding in C for 1.5 years and
  5367. occaissionally coding in C before that; I am now used to the && and ||.
  5368. However, I would have learned C years before if it had used standard "and"
  5369. and "or" notation.
  5370.  
  5371. Implementation in Chaos:
  5372. Since Chaos already transforms the original source code into real C code
  5373. via tex2c there is no reason not to expand its functionality to trasform JC
  5374. source code into plain C source code.  As it transforms the code it will
  5375. perform error checking to make sure that your NEXTs match with FORs and not
  5376. with an IF or a SWITCH, etc.  The code will also be properly indented.
  5377.  
  5378.  
  5379. Major problem discovered with C macros:
  5380.  
  5381. FOR(i=1,j=1;i<=wizards[p].BonusArrayPointer;i++,j++)
  5382.  
  5383. The FOR macro won't work in the above example due to the , (comma) meaning 2
  5384. different parameters.  So we must find a way to make a macro work with any
  5385. number of parameters.  Either that or JC will have to preprocess the files
  5386. like tex2c does.
  5387.  
  5388. Or I could just rewrite the FORs to have i=1; j=1; right before the FOR.
  5389. NO that doesn't work because there is still i++,j++ at the end.... hmmm...
  5390. Changing FOR to take 10 parameters doesn't work either.  The macro wants
  5391. EXACTLY the number of parameters that have been defined for it.
  5392.  
  5393. Due to lameness in the C preprocessor there is no way to #define a macro
  5394. whereby EVERYTHING within the parenthesis () is considered to be just 1 big
  5395. parameter; therefore, I cannot implement FOR NEXT loops in a simple manner.
  5396. I must either preprocess the code and translate from the source file to a
  5397. new file or I can make up a DO keyword and continue to do everything within
  5398. tghe confines of #define statements.  The latter course of action is being
  5399. taken at this time.  So a FOR NEXT loop must look like this:
  5400.  
  5401. FOR (x=0;x<25;x++) DO
  5402.   blahblahblah();
  5403. NEXT
  5404.  
  5405. Sorry about the above inconvenience.
  5406.  
  5407. Luckily much of the work of implementing JC can be accomplished with clever
  5408. use of #define macros.
  5409. This has the advantage of working perfectly with the C debugger.
  5410.  
  5411.  
  5412. ARRAY BOUNDS CHECKING has not yet been implemented.  I have worked out the
  5413. basic algorithm for implementing it but I have had numerous personal
  5414. problems with work, my car breaking down and I had to move to a new house
  5415. then I got sick, so I have accomplished very little in the last month.
  5416. Therefore I will implement the array bounds checking either A) When it
  5417. becomes extremely important or B) whenever SAI has a lock on the gamecode
  5418. and I have nothing better to do.  In the meantime I will begin implementing
  5419. things which I hope are more important and more fun.
  5420.  
  5421. *****************************************************************************
  5422. **************** END NEW PROGRAMMING LANGUGAGE: JC **************************
  5423. *****************************************************************************
  5424.  
  5425. * Test Macro(x) vs. Macro (x)  Will it work?  YES!
  5426.  
  5427. * Thursday morning: Upgraded Audio.tex to new JC syntax Then had to go to
  5428.   work all day.
  5429. * Friday morning: Upgraded Bonus.tex to JC.
  5430.  
  5431. ** BEGIN 3 days off:
  5432. * Saturday Morning: Upgraded Cast.tex to JC.
  5433. * Saturday Evening: Upgraded Cell.tex to JC. 
  5434.  
  5435. * Sunday Morning: Upgraded cmove.tex, core.tex, graph.tex, part of editor.tex.
  5436. * Sunday Evening: Upgraded info.tex, init.tex.
  5437. * PLAYED a test game: Everything basically works ok.
  5438.  
  5439. * Monday Morning: Upgraded menu.tex and move.tex to JC.
  5440. * Monday Evening: Upgraded msg.tex, pointer.tex, pool.tex (lots of editing
  5441.   to the tex of pool.tex. 
  5442. * Played a test game: everything seemed to work ok, but at some point the
  5443.   Independents had a score of -11.  How is that possible?
  5444. * Upgraded pool2tex.tex and predicate.tex to JC.
  5445.  
  5446. * Tuesday Morning: Upgraded 75% of prog.tex to JC then had to go to work.
  5447. ** END 3 days off 8(
  5448.  
  5449. * Wednesday Morning: Finished upgrading prog.tex. Finally!
  5450. * Thursday Morning : Upgraded score.tex to JC.
  5451. * Friday Morning:    Upgraded spell.tex to JC
  5452. * SUSPICIOUS:  I noticed some code in IntelligentComputerSpellSelect() that
  5453.   disables the .necro or .forgot but there is only 1 chance in 32 of it
  5454.   happening.  There is similar code in GetSpells()
  5455.  
  5456. Begin 3 days off:
  5457. * Saturday morning: Upgraded start.tex, text.tex, warp.tex, flashywin.c to JC.
  5458.  
  5459. * Played a test game:  Everything seemed to work just fine except for:
  5460.  
  5461. * BUG: when a creature ends it movement the "Range = X" line of
  5462.   WriteNearBottom is not erased. FIXED.
  5463.  
  5464. * BUG: I was playing a game and  there were no indpendents left alive.
  5465.   After I went the computer said "INDEPENDENTS" and them immediately started
  5466.   making lots of bonus spell noises and stuff.  This was caused by the
  5467.   awarding of bonus spells from manabatteries etc.  So there needs to be
  5468.   some sort of notification that the game is processing the update phase and
  5469.   is NOT still doing the Independent movement.  FIXED.
  5470.  
  5471. * BUG: The Repulsion spell does not repel scrolls properly.  Sometimes there
  5472.   is a cell which contains nothing while the underpart contains the scroll
  5473.   that used to be there.  This results in NOBODY collecting lots of free
  5474.   scrolls from empty cells. FIXED.
  5475.  
  5476. I intentionally skipped over SPELLMAN.TEX  because AFAICR I
  5477. havent made any changes to this file.  I'll try to leave it untouched in case
  5478. SAI has made any changes to it during the past 2 months while we have been
  5479. out of communication.
  5480.  
  5481. * Saturday Evening: Upgraded io.tex to JC.
  5482.  
  5483. * Sunday Morning: Upgraded editor.tex to JC.  YAHOO!  All main program files
  5484.   are now upgraded to the new syntax!
  5485.  
  5486. * As I was upgrading all of the above files I corrected several places
  5487.   where an else appeared to be associated with a particular if based on its
  5488.   indentation but in fact was associated with a completely different if.
  5489.   I fixed them as I noticed them.  I left millions of other indentation
  5490.   errors for the JC formatter to fix automatically.
  5491.  
  5492. * FLAW: Abduction spell abducts artifacts then the artifact owners are
  5493.   immediately recalculated in the update phase so the net effect is nil.
  5494.   NOW FIXED: Abduction no longer targets artifacts.
  5495.  
  5496. BUG: I somehow did the menus too fast for the editor and the game sort of
  5497. locked up.  I couldn't get the menus to work anymore.  I was stuck and
  5498. unable to do anything.  Leaving this for SAI.
  5499. SAI: Probable symptom of ReleaseSemaphore in the wrong place. Or else
  5500. a double Obtain if two consecutive Obtains.
  5501.  
  5502. * I only upgraded the first 2 spell files (Abduction & AcidRain) to JC.
  5503.   I will either leave the rest of the spell files for SAI or I'll do them
  5504.   some other time.  Right now I need to work on the formatter.
  5505.  
  5506. Sunday:
  5507. * Joseph came over and we played a test game
  5508. * BUG: Plasma Beam locked up the game. (oops a misplaced END_IF) NOW FIXED.
  5509.  
  5510. * Put in some simple IFs to reduce the intensity of the background color
  5511.   on lissajous squares but this seems to have completely stopped the background
  5512.   color cycling 8(
  5513.  
  5514. * COOL! I FINALLY found the bug in my lissajous background color cycler!
  5515.   Now it does more or less what I had intended it to do!
  5516.  
  5517. Monday:
  5518. * Banged together a simple JCformat proggy.  Doesn't have any really fancy
  5519.   features yet.  Doesn't handle everything.
  5520.  
  5521. End 3 days off. 8(
  5522. Tuesday: Work on car.  Go to work. 8(
  5523.  
  5524. Thursday July 2nd, 1998: My psychotic bitch mom STOLE my car and now I can't
  5525. go to work! I was supposed to work all day today and make $100.00.  I will try
  5526. to do some programming but I am so upset I doubt I'll be able to concentrate.
  5527.  
  5528. * SUCCESSFUL TEST: I used JCformat on chaos.c and near the end of the
  5529.   program I noticed that the indentation was off.  This is what happens when
  5530.   something is mismatched... In this case it was an IF-THEN-END_IF problem.
  5531.   So even without strict alignment checking, the formatter can "detect" and
  5532.   show you where code structures don't match up by the fact that the
  5533.   indentation is OBVIOUSLY wrong.
  5534.  
  5535. * SUCCESSFUL TEST: JCformat on flashywin.c like this:
  5536.   JCformat flashywin.c flashywin.jc
  5537.   This produced a perfectly indented file that looked great to the naked eye.
  5538.   I then tested it with:
  5539.   diff -w t:flashywin.c t:flashywin.jc
  5540.   NO DIFFERENCE reported.
  5541.  
  5542.   Then I did JCformat t:flashywin.jc t:flashywin.jjc
  5543.   (I formatted the already formatted file)
  5544.   cmp t:flashywin.jc t:flashywin.jjc  says "Files Compare ok".
  5545.   So they are byte-for-byte identical.
  5546.  
  5547. * REPEATED ABOVE TEST on chaos.c.  Works perfectly!  YAHOO!
  5548.  
  5549. Well, here's the deal: I've used 2 character indentation on all my zillions
  5550. of TrueBASIC programs over the years and I loved it.  2 characters is the
  5551. minimum amount to be easily seen by the eye and it keeps my program
  5552. listings from going off the edge of the paper in those deep nests with long
  5553. lines in them.  I really like 2 character indentation because I like all of
  5554. my lines to be 140 chars or less because that is what I like to print my
  5555. programs out at.  Sometimes I use 160 characters per line (Courier 6
  5556. point).
  5557.  
  5558. But the Chaos source code had many places with 4 character indentation and
  5559. some blocks of code had 6 characters of indentation!  So switching from
  5560. that much indentation to only 2 chars seems like a bit of a shock and it
  5561. seems harder to read.  I honestly don't think it _is_ harder to read I
  5562. think it just _seems_ that way because we are used to something different.
  5563.  
  5564. Anyway I am breaking with tradition and using 3 chars of indentation as the
  5565. standard default.  This should be an ok compromise I hope.
  5566.  
  5567. If you don't like it you can always reformat it anyway you like.  It only
  5568. takes a second to reformat a file.
  5569.  
  5570. Consider BEGIN_STRUCT and END_STRUCT macros.
  5571. Consider DO_FOREVER and LOOP_FOREVER macros.
  5572.  
  5573. * PATCHES INSTALLED: I have downloaded all the SASC patches
  5574.   from Aminet and have installed them:
  5575.  
  5576. sc655pch.lha       biz/patch  1.0M 176+SAS/C V6.55 bug fix for Amiga SAS/C 6.50 and SAS/C 6.51.
  5577. sc656pch.lha       biz/patch  191K 144+SAS/C 6.56 Patch (requires 6.55)
  5578. sc657pch.lha       biz/patch  595K  89+SAS/C 6.57 Patch (requires 6.56)
  5579. sc658pch.lha       biz/patch  668K  49+SAS/C 6.58 Patch (requires 6.58)
  5580.  
  5581. * SCREWEY BUG ELIMINATED: Now that I am using the latest version of the C
  5582.   compiler that screwy bug that prevented us from compiling init.c with
  5583.   optimize=on has disappeared!  YAY!  Now that I am compiling init.c with
  5584.   optimize=on (for smake release) it is saving us 728 bytes on the
  5585.   executable filesize!
  5586.  
  5587. *****************************************************************************
  5588. ****************  SOURCE CODE READABILITY UPGRADE  **************************
  5589. ****************         PART 3: DEBUGGING         **************************
  5590. *****************************************************************************
  5591.  
  5592. Problem: When looking at the code in the debugger it looks completely
  5593. different from the real source code due to the fact that all the cool tex
  5594. comments have been stripped out.
  5595.  
  5596. Problem: Errors during compilation are reported at line number x, which has
  5597. no relation to the line number of the source code due to the fact that all
  5598. the cool tex comments have been stripped out.  Thus the line number given
  5599. is often 100+ lines wrong.
  5600.  
  5601. Since it is highly desirable to be able to see the program documentation in
  5602. the degubber while debugging, we must not strip out all of our tex
  5603. documentation.
  5604.  
  5605. Solution:
  5606.   1. The tex will no longer be stripped out.
  5607.   2. tex2c will no longer be used.
  5608.   3. A seperate program, c2tex can be used to generate a tex file.
  5609.      (Leaving the coding of this proggy to SAI but it will be easy.)
  5610.   4. Edit all makefiles to eliminate the use of tex2c.
  5611.   5. Change all occurences of 
  5612.      \section to /*\section
  5613.      \end{verbatim} to /*\end{verbatim}
  5614.      \begin{verbatim} to \begin{verbatim}*/
  5615.   6. No more .tex files used in compilation.  Only .c and .h files.
  5616.  
  5617. Thus all tex documentation will be embedded in C comment blocks. Thus there
  5618. is no need to strip it. Thus we can read it in the debugger.
  5619.  
  5620. This has the side effect of making the source code take less drivespace,
  5621. since there is only 1 copy of each source file, rather than 2 copies.
  5622.  
  5623. * Transformed and eliminated audio.tex, bonus.tex, cast.tex, cell.tex,
  5624.   cmove.tex, core.tex, editor.tex, info.tex,
  5625.   Upon recompiling init.tex I found a horrible bug that crashes the game
  5626.   every time.  I checked some old versions of the code (2.2 and 2.1) and the
  5627.   bug has been there for ages.  Funny how it never crashed the game till now.
  5628.   Anyway, it is FIXED now.
  5629.   Transformed io.tex, menu.tex, move.tex, msg.tex, pointer.tex,
  5630.   predicate.tex, chaos.tex, score.tex, spell.tex, start.tex, text.tex,
  5631.   warp.tex.
  5632.  
  5633. As a result, numerous files which were once combined together into large
  5634. .tex files are now their own standalone file. e.g. edmenu.dat, menumaker.c,
  5635. and others.
  5636.  
  5637. * I didn't convert pool2tex.tex, graph.tex or pool.tex yet since I
  5638.   presumably don't have to debug those and I am anxious to get back to some
  5639.   real coding.
  5640.  
  5641. * INSTALLED MUNGWALL & SUSHI: I was having a nasty random bug in JCformat
  5642.   so I installed MUNGWALL & SUSHI to try to find it.  It showed me the bug on
  5643.   the 1st try. I was writing 1 byte beyond the end of my allocated memory.
  5644.  
  5645. *****************************************************************************
  5646. **************** END SOURCE CODE READABILITY UPGRADE ************************
  5647. *****************************************************************************
  5648.  
  5649.  
  5650. Jerry came over and we played a game that lasted all night long.  We each
  5651. made our fair share of good and bad moves throughout the game.  For most of
  5652. the game Jerry had been winning like crazy.  This is partly due to the fact
  5653. that I waited and waited and waited till the last possible moment to use my
  5654. Invert spell then things started to change.  A few turns later and I was
  5655. definitely winning.  I could have won the game but then I got tired and
  5656. made an INCREDIBLY stupid move.  My wizard was in a tree and the tree
  5657. collapsed.  I had Magic Wings with 5 movement and LOTS of safe places to
  5658. move to.  But instead I hopped into the next tree.  BAD MOVE.  The next
  5659. tree only had *1* life point and my wizard had only 10 life points.  And
  5660. seeing as how that 1 particular square was one of the few on the board
  5661. where Jerry could attack me with 2 creatures at once.  I got killed.  Darn.
  5662. My Iridium horse had been really kicking some ass....
  5663.  
  5664. I wouldn't have died if it hadn't been for the fact that Jerry had control
  5665. of the only artifact on the board.  If not for that artifact my last move
  5666. would have been nothing more than an insignificant mistake.  But as it
  5667. happened I got killed. This is the 2nd human vs. human game I've played where
  5668. artifacts were directly responsible for the outcome of the game.
  5669.  
  5670. We played with 4 buried scrolls and 4 buried artifacts with scroll delay of
  5671. 3.  No Texas Trash'em.  6 computer wizards.
  5672. Every scroll we dug up was something really cool.  I dug up an Iridium
  5673. Horse Scroll and a kill scroll.  Obtaining the scrolls was quite
  5674. challenging because it took several turns to dig them up and then 3 more
  5675. turns to collect them.
  5676.  
  5677. One interesting event in the game occured when a mounted computer wizard
  5678. cast a Shadow City next to himself but refused to enter it.  My wizard had
  5679. magic wings with 5 movement points + Elf Boots + Combat + Recover Boost
  5680. so I immediately began to cross the entire board to get there.  It took 5
  5681. turns to make it inside the Shadow City.  I took a lot of damage along the
  5682. way.  My brother thought I was crazy for charging my wizard off like that.
  5683. It ended up being well worth it.  I got to pick 3 great spells from a list
  5684. of 10!  Awesome!
  5685.  
  5686. There were several turns in the game where I had to REALLY strategize
  5687. seriously in order to keep my brother from running me over.
  5688.  
  5689. Jerry cast a Tempest which really made the game exciting.  First it came at
  5690. me and charged into my group of creatures and scattered them out one by
  5691. one.  Jerry then used his group of creatures to kill them off one by one
  5692. since they had no backup and were isolated from their buddies.  This left
  5693. me VERY weak.
  5694.  
  5695. But a few turns later and the Tempest went into Jerry's territory and
  5696. started scattering his creatures in a similar fashion so this evened things
  5697. up somewhat.  What a great game.
  5698.  
  5699. Here are the bugs we found:
  5700.  
  5701. Jerry cast a cat lord and the cat lord immediately cast a Jaguar but the
  5702. Jaguar allegedly never moved (several turns) till Jerry killed the Cat Lord.
  5703. The cats which were already on the board when the Cat Lord was cast all worked
  5704. like they were supposed to.  They moved around and killed things, etc.
  5705. Unfortunately I didn't pay that much attention to it.  I think the Jaguar
  5706. may simply have been sitting by a pool the entire time.
  5707. SAI: I find this very hard to believe. Most likely the computer just
  5708. decided there was no benefit in moving it.
  5709.  
  5710. * TEMPEST BUG: Jerry cast a Tempest whose Life Force and Recovery and Combat
  5711.   kept mysteriously rising.  Furthermore, it managed to accumulate several
  5712.   Foes Killed every single turn even though it never killed anything.  And
  5713.   this happened whether it teleported something or not.  By the end of the
  5714.   game it had 54 Foes Vanquished.
  5715.  
  5716.   Ok I have determined that Tempests were "killing" every empty cell that
  5717.   they moved onto and they were also "killing" every dead body that they
  5718.   were moving onto.  Presumably, killing an empty cell was its favorite
  5719.   food and that is why its stats were raising so high.
  5720.   TEMPEST BUG FIXED.
  5721.  
  5722. * BUG: Sleeping Tempests could still move. FIXED.
  5723.  
  5724. * IMPROVED SCROLLING: Due to a misunderstanding of arcane timing lore, the
  5725.   scrolling of the screen in the intro was, in fact, only executing at 25 fps.
  5726.   It now runs at 50 fps for faster, smoother operation.  Unfortunately, the
  5727.   scrolling jerks a little bit each time the OS does something for 1 frame.
  5728.  
  5729. * SCROLLING now at priority 50.  This fixes the above occaissional glitches
  5730.   for nearly all situations.
  5731.  
  5732. * INSTALLED ENFORCER in my User-Startup so it will always be running from
  5733.   now on.  "enforcer stdio"
  5734.  
  5735. * Paid $165.00 for a unix shell account for 6 months.  They then REFUSED to
  5736.   send me any info about how to access my unix shell account.  But they did
  5737.   tell me how to get into my ppp account.  I have asked them repeatedly and
  5738.   they simply will NOT tell me how to access the unix shell account. Damn
  5739.   bastards.  I have spoken to some people who do not work for this ISP and
  5740.   they are of the opinion that the unix shell account CANNOT be accessed
  5741.   without first logging into the ppp account!  ARGH!!!!
  5742.  
  5743. * NEW HARD DRIVE purchased and installed.  It is a 4.3 gigabyte Quantum
  5744.   Fireball SCSI drive that cost me $300.00.  I now have ROOM!  YAY!!!
  5745.   I can actually _install_ software on my Amiga!!!!!! Coolness!
  5746.  
  5747. * INSTALLED MUI 3.6 + Miami 1.1 + AmFTP 1.89a and everything worked great on
  5748.   the first try!  However I was having probs with ftp transfers so I upgraded
  5749.   to the following:
  5750.  
  5751. * INSTALLED MUI 3.8 + MIAMI 3.0 + IBROWSE 1.2 + AmFTP 1.89a + WorldNews1.0.
  5752.   NOTES:  Hotmail won't let me send attachments with Ibrowse.
  5753.           Miami 3.0 is MUCH more difficult to install than 1.1 was. 8(
  5754.       Installing all this new software made no difference to my ftp
  5755.       transfers.  Every ftp site on earth seems to work perfectly
  5756.       except for 1.  It just doesn't work right no matter what I do.
  5757.       Luckily this is irrelevant.
  5758.  
  5759. * I am now on the net with a ppp account.  This sure makes uploading and
  5760.   downloading a lot easier.
  5761.  
  5762. I still need to install an Email proggy.
  5763. I still need to install Directory Opus Magellan.  It is supposed to be the
  5764. ULTIMATE piece of software.  It is supposed to be the BEST for ftp and the
  5765. BEST for viewing and adding/deleting files from/to compressed archives and
  5766. millions of other things.
  5767.  
  5768. * Put in 3 different MeltScreen effects. There is a problem in knowing how
  5769.   to redraw the right hand side of the screen after this effect.
  5770.   I don't know how to solve this.
  5771.  
  5772. * Biohazard now uses the MeltScreen(SINK) effect.
  5773.  
  5774. List of spells that might go well with the MeltScreen effect.
  5775. *meddle, mutate, *dissection, acid rain, disrupt,
  5776.  
  5777.  
  5778. I want to use MeltScreen(SUCK) with devastation but I don't want the screen
  5779. to be redrawn until after all the appropriate cells have been
  5780. killed/reinstated.  So how should I do this?
  5781.  
  5782. A) add a REDRAW option to MeltScreen. Then call MeltScreen(NOREDRAW) then
  5783.    manually redraw the screen in the .spl file.
  5784. B) add a "function to be called before the redraw is done" option.
  5785.    If this function address is not null then it will be called before any
  5786.    redrawing is done.
  5787.  
  5788. I implemented option B but then I realized that this wouldn't work because
  5789. the spell handler needs access to some variables so I am making all those
  5790. variables STATIC and moving CastFreeSpell and CastMagicSpell near the end
  5791. of cast.c.  I couldn't think of any disadvantages to doing this. (Not that
  5792. my judgement is any good right now since I am still extremely sick at the
  5793. time of this writing.)
  5794.  
  5795. This now means that we are 1 small step closer to being able to have
  5796. seperately compiled spell handlers since each spell handler can now be its
  5797. own seperate, independent function with access to all the game's global
  5798. variables + these few semi-global (STATIC) variables such as id, player, p,
  5799. b, wizardsp, wizard_cell and w_stat.
  5800.  
  5801. I am not saying that we 100% want the capability to have seperately
  5802. compiled spell files but it would be nice to have that _option_, should we
  5803. decide that it is desirable.
  5804.  
  5805. * Devastation now uses MeltScreen(SUCK)
  5806.  
  5807. I didn't pick a spell to use MeltScreen(SWIM).  I'll leave this for SAI.
  5808.  
  5809. * WaveScreen effects: You can now make the entire screen wave with
  5810.   StartWavyTask(screen,1);  Small numbers mean more radical waving.  Larger
  5811.   numbers mean very gentle waving.  I implemented this as its own task
  5812.   because this effect can be used WHILE WE PLAY THE GAME AS USUAL. Kewl!
  5813.  
  5814.   Of course if you don't want it waving the screen in the background just
  5815.   do: StartWavyTask(screen,1);
  5816.       WaitTOF(80); // wait however long you like, set vars, call functions, etc.
  5817.       StopWavyTask();
  5818.  
  5819.   In general we will want to use the WavyScreen effect in the above manner.
  5820.  
  5821.   But for Vodka spell I want the effect
  5822.   to last for the entire duration of the afflicted player's turn.
  5823.  
  5824.   I am not in "graphics design mode" right now so I leave the
  5825.   graphical design of the above spell to SAI.
  5826.   Here is roughly how it works.  You cast the spell on a player.
  5827.   This sets the appropriate wizard bit ala BattleCry etc.
  5828.  
  5829.   At the beginning of the afflicted person's movement phase we
  5830.   StartWavyTask(screen,2);
  5831.  
  5832.   If the drunkeness bit is set then all his creatures do only half
  5833.   damage.  (Just modify the combat routine to check for that bit and then
  5834.   >>1 the damage.)  At the end of his movement phase just StopWavyTask();
  5835.   and clear the drunkeness bit. VOILA! 8)
  5836.  
  5837.   This effect normally doesn't take many cpu cycles, however since we have
  5838.   2 visible screens on our display it probably slows down the computer
  5839.   noticeably.
  5840.  
  5841.   However it DEFINITELY does not slow down the computer any to wave a 64
  5842.   color screen instead of a 2 color screen.  Either way the screen waves
  5843.   instantly on command due to the power of the copper.
  5844.  
  5845. * Bless and Haste now utilize the WavyScreen effect. 
  5846.  
  5847. Doing the screenwave effect + the screenmelt effect simultaneously looks
  5848. extra gross in a horrific sort of way.
  5849.  
  5850. ????  I just edited the description of Arborist and saved it.  Then I did
  5851.   smake newspell.  But the game is still using the old description! 8(
  5852.   spells.tex has the new description but the game doesn't!
  5853.  
  5854. pool.ssc is dated June 30th, 1998.  This is August 24th.  pool.ssc hasn't
  5855. been updated all this time! 8(
  5856.  
  5857. In an attempt to fix above problem I threw the following lines into the
  5858. makefile: (SAI should look at the makefile to see if it is in correct order.)
  5859.  
  5860. pool.ssc: pool.txt sencode.o
  5861.     sencode <pool.txt
  5862.  
  5863. ok, that didn't work.  I'll leave this mysterious matter to SAI.  I just
  5864. don't know what all these different things do (sencode, decode, ae, ad,
  5865. single, fixfreq... AUGH!!! I guess I really broke something somewhere.)
  5866.  
  5867. SAI: ALLEGEDLY FIXED this problem.
  5868.  
  5869. Made various other changes to the makefile but no luck. 8(
  5870.  
  5871. Dear SAI: How about whipping us up a green square Image and a pink square
  5872. image so that we can show damaged movement on the info screen similar to
  5873. the way all the other stats are shown?  Thanx. (remember the colors on the
  5874. hires screen are different from the colors on the lores screen.)
  5875. SAI: Modified DrawSquares so you can use any HIRES screen colour that
  5876. you wish. DONE
  5877.  
  5878. * Reduced the probability of Bipedal Generators.
  5879.  
  5880. * Changed NOLOADORSAVE to be NOLOAD and removed the appropriate #ifdef NOLOAD
  5881.   references from the code.  This way the demo game can be played and
  5882.   saved.  Then when they get the registered version they will allegedly
  5883.   be able to load in their saved games and continue.
  5884.  
  5885. * FLAW: the 2nd menu strip (CONTROLS: Speech, Sound, Impurities etc.)
  5886.   does not highlight correctly.  This dates all the way back to v1.0
  5887.   FIXED.
  5888.  
  5889. * FLAW: Something about the game that has always really bothered me is
  5890.   that there was no way to know what turn it was.  Grrr...  When I play
  5891.   a long long game I have no idea how many turns I've played.  I like
  5892.   to know what turn it is so that I know about how many spells I have left
  5893.   and because sometimes I play a ridiculously hard game just to see how
  5894.   many turns I can survive.  FIXED. The turn # is now displayed on the
  5895.   Scores Screen.
  5896.  
  5897. * ADDED the saving of TurnCount into the header block of io.c  so now
  5898.   the Turn number is properly saved and loaded.
  5899.  
  5900. * BUG: I killed a Bird Lord with my mounted hourse and it was promoted to
  5901.   a Nightmare then immediately to an Iridium Horse.  FIXED.
  5902.  
  5903.   However, the IsDragon macros automatically report all mountable
  5904.   set 2 creatures as dragons.  Therefore you can promote a Thundermare
  5905.   by killing Bird Lords, T-Rexs or Elephants, as well as real dragons.
  5906.   SAI: I think this is acceptable.  
  5907.   JC: It's ok with me too.
  5908.  
  5909. Nothing of consequence done during september.
  5910.  
  5911. Absolutely, literally NOTHING done during October and November.
  5912. Too busy with work, fixing car, girls.
  5913.  
  5914. * Thanksgiving day playtesting.  Jerry, Joe and JJ learned the hard way
  5915.   that if player 1 casts an alliance spell on player 2 then player 3 casts
  5916.   an alliance spell on player 2 that the first alliance is severed.
  5917.   We never knew that it worked like that.  We should probably figure out
  5918.   some eloquent way of saying this in the spell description.
  5919.  
  5920. * Installed YAM1.3.5 for direct email contact between JJC and SAI.
  5921.   Hotmail has grown progressively worse ever since Bill Gates took it over.
  5922.   It just kept getting worse and worse until finally it just plain stopped
  5923.   working a few weeks ago.  I now use YAM for my "real" Email but my
  5924.   new permanent address is JamesConwell@yahoo.com
  5925.  
  5926. Since the makefile seems to change every time we swap the code around,
  5927. Maybe we should just forget about smake unarchive and just make a
  5928. fresh dir for the game each time we swap control and
  5929. "lha x" it then just do a "smake dev".  That will guaranteed work
  5930. so long as we don't forget to include any files in the archive.
  5931.  
  5932. * TESTED
  5933.   1. smake archive
  5934.   2. put the archive in a virgin dir and lha x #?
  5935.   3. smake dev
  5936.   WORKS ALMOST.  ALL FILES PRESENT AND ACCOUNTED FOR EXCEPT for
  5937.   fixfreq isn't getting recompiled by the makechaos file.
  5938.   I guess the dependencies are in reverse order or something.
  5939.   Leaving this for SAI to fix. NOW FIXED
  5940.  
  5941. * I just burned a floppy version of Chaos 2.3df and the disk is
  5942.   100% FULL.  Looks like I cut it real close.  Good thing I eliminated
  5943.   all that code and did all those optimizations.  Every little bit
  5944.   actually ended up making a difference.
  5945.  
  5946. * UPLOADED version 2.3d to Aminet.
  5947.  
  5948. December 1, 1998: ReleaseSemaphore(&SourceCode) by JJC
  5949. END OF VERSION 2.3
  5950. BEGIN  VERSION 2.4
  5951.  
  5952. * Fixed printf format bugs in sm.c, pool.tex.
  5953. * Made sm, reincalc, work under Unix.
  5954. * FIXED the problem with the generation of the "rein.h" file. I was
  5955.   deleting the file before it had a chance to be used. The program
  5956.   "reincalc" is only used to produce a table of reincarnation numbers
  5957.   for inclusion in the manual.
  5958. * FIXED type errors in decode.c, sencode.c, and graph.tex
  5959. * Stopped "graph.tex" from including inutition.h unnecessarily.
  5960. * Allegedly fixed menu recoverable error problem. This fix is not
  5961.   to my satisfaction and I will try and find a better solution. NOW FIXED
  5962. * Allegedly fixed the makefile problem with generating pool.ssc.
  5963. * REMOVED sound effect from BioHazard.spl (I don't feel this was
  5964.   necessary with the new screen effect).
  5965. * CHANGED: The eye-eye powerup now only gives 2 counts instead of
  5966.   5, but its effect can now be accumulated by casting the spell
  5967.   multiple times.
  5968. * Added MOUNTABLE2_STAT to the Shadow Dragon.
  5969. * Modified DrawSquares in info.c so that we can draw squares in any
  5970.   colour.
  5971. * Modified the movement and range stats to show the original value
  5972.   in red (i.e. like all the others stats) and the current value in
  5973.   green. I didn't do anything about recovery for movement.
  5974. * Added a few new random messages for wizard spell selection.
  5975.  
  5976. === Improvements to JC language ===
  5977.  
  5978. * ADDED support for DO_FOREVER loops to JC (replaces DO_WHILE(1))
  5979.  
  5980. * Added formatting for multiline /* comments. All such comments
  5981.   will now appear thus:
  5982.  
  5983. /*
  5984. blah blah blach ................................... black heep
  5985. toxic fumes kill wizard blah blah bvlah
  5986. */
  5987.  
  5988.   That is, the /* and */ appear on lines by themselves. The text
  5989.   in the comment is automatically word-wrapped at 75 characters
  5990.   (taken accounts of spaces of course). New paragraphs can be
  5991.   forced with two returns (as in most of our files). Finally,
  5992.   lines starting with * in a comment are passed through as is.
  5993.   This allows for lists to go through without formatting errors.
  5994.  
  5995.   I would have liked to indent the comment text a couple of spaces
  5996.   but I couldn't think of any easy way of doing this using my
  5997.   curret strategy.
  5998.  
  5999.   None of this affects /*-style comments on a single line.
  6000.  
  6001.   Someone still needs to do something with // style comments.
  6002.   I suggest that if // is the first thing on a line, then that
  6003.   line should be indented with the current indentation.
  6004.  
  6005.   I haven't test this on every file yet, so there might still
  6006.   be a few problems.
  6007.  
  6008. Note from JC:
  6009.   The above strategy has some unfortunate flaws.
  6010.   1. It destroys my "outline style comments"
  6011.   2. It destroys blocks of code which have been temporarily
  6012.      commented out.
  6013.   3. Most comments are already properly word-wrapped.
  6014.   4. You can word wrap a paragraph in Cygnus Ed Professional by simply
  6015.      placing the cursor at the start of the paragraph and selecting
  6016.      format from the menu.  You can format with or without fill.
  6017.  
  6018.   Therefore: I am changing it so that the auto word-wrapping
  6019.   ONLY happens on blocks of code that start with /**
  6020.   Hopefully that is good enough.  Perhaps we should make it /***** or
  6021.   something?
  6022.  
  6023.  
  6024. * NOTE FOR JAMES: NULL, 0, and '\0' are three diffrent concepts
  6025.   and it is just by chance (design?) that they have the same
  6026.   value on most platforms. I have used computers where NULL!=0
  6027.   (VAX 370 for instance). Futher NULL is a 32-bit quantity
  6028.   on the Amiga, whereas '\0' is only an eight bit quantity.
  6029.   More sophisticated compilers will complain about incorrect
  6030.   usage.
  6031.  
  6032.   Therefore please use NULL only for pointers and '\0' to
  6033.   mean the nul character. At the moment you often use 0 for
  6034.   this function. Further it is better to write '\n' than
  6035.   10 for end-of-line since code using 10 will fail under
  6036.   DOS, Cray, or Mac because of different line-ending
  6037.   conventions. Using '\n' should work for all platforms
  6038.   (POSIX standard).
  6039.  
  6040. * Added a few extra bits of code to JC-Lang so that it will work
  6041.   under a standard Unix environment. I needed this because I
  6042.   often test chaos stuff under Linux. A good reason for this
  6043.   is that make/gcc on Linux can churn through the entire
  6044.   spell-manager part of building in Chaos in under 15 seconds,
  6045.   yet this takes about 30 minutes on my Amiga.
  6046.   JC: You are racing a 1997 linux CPU against a 1987 Amiga CPU.
  6047.   The 68030 was introduced in 1987.
  6048.  
  6049. * I think we should completely phase TeX out of the source code
  6050.   now that we have a decent automatic formatter. ??
  6051.   JC: I don't care if we "phase TeX out" or not, but I would
  6052.   like it if you phased out the other .tex files so that all files
  6053.   are real code files.
  6054.  
  6055. * RENAMED: JCformat.jc to JCformat.c for Unix compatibility.
  6056.  
  6057. * ERROR: Just discovered Intuition defines a looping structure
  6058.   using FOREVER. Therefore I have renamed the JC equivalent
  6059.   to DO_FOREVER. If only the Intuition one had a { at the end
  6060.   of the definition all would have worked fine!
  6061.  
  6062. === end JC-Lang improvements ===
  6063.  
  6064. * Removed all .obe files from the game. Created .raw files for
  6065.   those .obe files which did not have .raw files. This saves
  6066.   a fair bit of space in the development directory, and archive
  6067.   file although makes no difference to the compiled program
  6068.   size.
  6069.  
  6070. * Modified the info panel so that creatures having the REIN
  6071.   bit set, show the number of reincarnations steps remaining
  6072.   in their sequence (previously just an `R' was shown).
  6073.  
  6074. === Start of input handler upgrade ===
  6075.  
  6076. * Completely rewrote HandleIDCMP with the aim of making it the
  6077.   sole place in the program to handle IDCMP events; although
  6078.   I have not yet incorporated the editor functionality into it.
  6079.   In the process I eliminated a few horrid global variables,
  6080.   I wish I could get rid of more of them.
  6081.  
  6082.   There should no longer be any menu selection problem.
  6083.   There should be less lossage of meaningful events.
  6084.   Return to end your turn now works much better.
  6085.   Various highlighting functions are more homogeneous.
  6086.   The mini-editor is still supported.
  6087.  
  6088. * Moved various bits of JC's timing code to the bottom of
  6089.   the chaos.c file since I didn't want them cluttering things
  6090.   up while I was doing the new logic.
  6091.  
  6092. * Hmmm. Discovered that the existing editing functions are
  6093.   already using some routines from chaos.c and now there
  6094.   is a conflict. Oh well, have temporarily turned those things
  6095.   off in the editor. NOW FIXED
  6096.  
  6097. * Incorporated the editor IDCMP handler into the main game
  6098.   handler, thus moving the one step closer to a single IDCMP
  6099.   handler. In addition this change shaved 500 bytes on the
  6100.   size of the code segment.
  6101.  
  6102. * Discovered I had accidently deleted the code for the `S' key.
  6103.   Reinstated it.
  6104.  
  6105. ====== End of IDCMP upgrade =========
  6106.  
  6107. * Modified the image tool to use only raw files. Took the
  6108.   opportunity to fix all the prototype error messages as well.
  6109.  
  6110. * Repaired the Quit option on the initialization screens.
  6111.  
  6112. WELL I'M OUT OF TIME. So back to JC.
  6113.  
  6114. NOTE: I haven't tested the modified JC formatter as much as
  6115. it should have been.
  6116.  
  6117. December 24th, 1998: ObtainSemaphore(&SourceCode) by JC:
  6118.  
  6119. unlha'ed the archive in a fresh dir and then did smake dev.
  6120. This produced a game that did not work due to no pool.ssc file having
  6121. ever been created.  Ok, I dug around and studied the fixfreq and sencode
  6122. and I understand what is going on now.
  6123.  
  6124. pool.ssc must be recreated when doing smake anything and pool.ssc does not
  6125.   already exist.
  6126. pool.ssc must be recreated when doing smake clean
  6127. pool.ssc must be recreated anytime that pool.txt is newer than pool.ssc
  6128.  
  6129. I'm not really sure exactly how this should be put into the makefile.
  6130. I just hacked something in and it didn't work.
  6131.  
  6132. Tried various different things and I just couldn't get a smake dev to
  6133. work from a freshly unarchived archive.  No matter what I tried some
  6134. mysterious thing wouldn't work.
  6135.  
  6136. I hate makefiles.
  6137.  
  6138. * FIXED various mangulated comments.
  6139.  
  6140. NOTICED: press a number key to highlight your creations. 
  6141. Press it again and nothing happens.  It used to unhighlight.
  6142. Is this good or bad?
  6143.  
  6144. * BUG: Press a number key to highlight your creations.  Press any Mouse
  6145.   Button. Menus no longer work.  This is due to all keys doing a
  6146.   TrapRMB with no corresponding PassRMB. NOW FIXED.
  6147.  
  6148. NOTICED: It always seemed like there was something missing from
  6149.      Classic Chaos.  I just figured out what it was.  I have now made
  6150.      Ropers and Wasp Nests CLASSIC.
  6151.  
  6152. * BUG: DO_FOREVER and LOOP aren't matching properly in jcformat.  FIXED.
  6153.  
  6154. * TESTED the latest jcformat on a couple of files.  Very minimal testing.
  6155.   seems ok.
  6156.  
  6157. * Added in medmod support to music.lib.  We can now easily play med (MMD0
  6158.   and MMD1) mods in Chaos.
  6159.  
  6160. * Added support for the QuadSpectrumAnalyzers into the medmod asm code.
  6161. * Added support for the Quadrascopes into the medmod asm code.
  6162.  
  6163. * Solved the mystery of converting period into samples per second
  6164. * Rewrote the quadrascopes to use the RIGHT formula now.
  6165. * Now the scopes really graph the part of the sample that is actually
  6166.   being played right that instant.  So now the scopes are accurate.
  6167.   You can really see the difference in speech samples such as "Chaos"
  6168.   where you can now see the peaks and valleys of the waveform as it is
  6169.   being played.
  6170. * Fixing the formula means that the scopes are now "locked in" to the music
  6171.   better.
  6172.  
  6173. * Implemented a 1000 entry lookup table to convert from the period value to
  6174.   samples per frame.  This saves 2 floating point divisions and 2 floating
  6175.   point multiplications each time a new note is started. But mainly it
  6176.   saves me the trouble of doing Floating Point math in asm.
  6177.  
  6178. * Tested all 6 game musics with the new system and they all work
  6179.   WONDERFULLY!
  6180.  
  6181. * Chaos now officially supports the playback of protracker and MED MMD0 and
  6182.   MMD1 mods.  If you have a choice then use MMD1.  Not that it really
  6183.   matters.  I have no idea which routine is faster, all I know is that MMD1
  6184.   mod format is superior to protracker mod format due to being able to handle
  6185.   more instruments and being able to have multiple songs per file.
  6186.   Hooray for Teijo Kinuunen!
  6187.  
  6188. Octamed Sound Studio Professional notes:
  6189. Octaves are 12, 23, 34, 45, 56, 67, 78, 89, 9A.
  6190. Octave 89 and 9A in OMSSP are illegal.  The notes are SUPER LOW.
  6191. Octaves 34 through 78 all sound the same
  6192.  
  6193.  
  6194. CHRISTMAS DAY PLAYTESTING:
  6195.  
  6196. * Designed a 4 player level with an exit in the middle, surrounded by walls.
  6197. 2 different versions.
  6198. 1. no generators
  6199. 2. 4 standard generators.
  6200.  
  6201. * ACK! BUG: smake release no longer works. I keep recompiling the program
  6202.   and it keeps telling me "unexpected end of file" and "semicolon expected"
  6203.   on the last blank line of the game.  Ok, traced this to a #ifdef
  6204.   DEVELOPER with no matching #endif.  NOW FIXED.
  6205.  
  6206. It took me a while to figure out the above bug so I was late and in a hurry
  6207. and I forgot to take the Level with me.  So we played a standard game of
  6208. James Vs. JJ with 20 scrolls, 4 generators, 4 artifacts and a 20 turn
  6209. limit.  This is the very first time that I (or JJ) has ever played with a
  6210. turn limit.  JJ started the game with 2 vanish spells.  He gained another
  6211. vanish after a few turns.  Plus he grabbed yet another vanish as a bonus
  6212. spell.  So I spent almost the entire game vanished with no creatures to
  6213. move or spells to cast.  Needless to say I lost.  The only possible bug to
  6214. report is that once I highlighted my creatures with "1" and then hit the
  6215. end of turn gadget and there was some strange noise during the computer
  6216. player's turn.  I don't really know if anything bad happened or not.  After
  6217. this the game continued normally.
  6218.  
  6219. * FLAW: Various snippets of level editor code are no longer undef'ed during
  6220.   smake release. NOW FIXED.  This saved 1048 bytes on the size of the
  6221.   release version.
  6222.  
  6223. * FLAW: Selecting "Load" from Setup Screen I produces some problems so I just
  6224.   quickly uncommented it for now. This saved 100 bytes on release version.
  6225.   As a general principle I believe that games should have a load option on
  6226.   the first main screen.  I'll just worry about it later because right this
  6227.   second I'm trying to nuke as many bugs as fast as possible.
  6228.  
  6229. * FLAW: exiting from reading a spell description makes a beep. FIXED
  6230.  
  6231. * BUSY WAITING LOOP?  When using cpr to track down the above bug I noticed
  6232.   something in HandleIDCMP.  The line of code that says:
  6233.   IF (Wait (HiResWindowWaitBit | windowWaitBit) & HiResWindowWaitBit) THEN
  6234.  
  6235.   never actually waited.  I traced over the code in cpr about 20 times and
  6236.   never once did it stop and wait for me to touch the mouse or keyboard.
  6237.  
  6238.   So I am thinking that somehow some sort of windowflag got messed up
  6239.   somewhere.  It has never done this before to me more than 2 or 3 loops.
  6240.  
  6241.   MYSTERY SOLVED: The trouble was that there is an ActivateWindow(window);
  6242.   call in the HandleIDCMP code now so I guess that as I pressed return on
  6243.   the line to execute the line, the window activates before I let off the
  6244.   return key. The strange thing is I am getting RAWKEY code 196 instead of
  6245.   68 like the return key is supposed to be.
  6246.  
  6247. * KEY RELEASE DETECTION mystery solved!  Codes 0 to 127 are key DOWN codes
  6248.   and 128 and up are key UP (RELEASE) codes.  So anytime a rawkey code is
  6249.   >128 just subtract 128 from it and you have the code that was released.
  6250.  
  6251.   But please note that keypresses do NOT neccessarily come in pairs of
  6252.   DOWN/UP codes.  If the user holds a key down then we are given a series
  6253.   of Key DOWN codes, one after the other, with no intervening UP codes.
  6254.  
  6255.  
  6256.   James Conwell's 10 Commandments  of Game Design:
  6257.   ================================================
  6258.  
  6259. Any game produced by James Conwell MUST have the following features:
  6260. 1. It must have an option for more than 1 human participant to play in a
  6261.    game.   I don't care what kind of game it is.  It MUST have at least
  6262.    a 2-player option.
  6263.  
  6264. 2. It must have a 1 player option.
  6265.  
  6266. 3. It should have an option for 2 player competitive as well as 2 player
  6267.    cooperative.  2 player cooperative mode is VERY important!!!!
  6268.  
  6269. 4. It must have awesome music.
  6270.  
  6271. 5. It must have a wide variety of awesome music, probably including but not
  6272.    neccessarily limited to the following:
  6273.    A. Spooky Music.
  6274.    B. Rave Techno.
  6275.    C. Straight Dance.
  6276.    D. Dramatic Music.
  6277.  
  6278. 6. It must have an intro that can be IMMEDIATELY exited at any time.
  6279.  
  6280. 7. It must make good use of the capabilities of the format that it
  6281.    is presented in/on.
  6282.  
  6283. 8. It must be FUN to play.
  6284.  
  6285. 9. We must go through the game and take out everything about it that is
  6286.    annoying and either remove it or make it optional.
  6287.  
  6288. 10. It must have good graphics.
  6289.  
  6290.  
  6291.  
  6292. The only way I know to stop the flicker of the pentagrams is to either:
  6293. A: Figure out a way to do double-buffering that really works.
  6294. B: Move the pentagrams to the bottom of the screen. (this is just a work
  6295.    around)
  6296. C: Make the game require OS 3.0 and use those double-buffering routines.
  6297.  
  6298.  
  6299. * INVESTIGATED the following examples of double buffering from Aminet.
  6300.   These are all that I could find:
  6301.  
  6302. dbuffer.lha        dev/e        3K  95+Easy double buffering of screens
  6303. DBuff.lzh          dev/src     12K 321+double buffering demo w/source
  6304. doublbuf.lha       dev/src      7K 171+Eg. of fast OS-friendly double buffering    
  6305. NBuff.lha          dev/src     19K 277+Double bufferung routines example. V2.2
  6306.  
  6307. All these examples SUCK because:
  6308. 1. They don't allocate  their bitmaps properly.  They use that icky
  6309.    scatterload approach.
  6310. 2. They use the slow RethinkDisplay(); technique.
  6311. 3. The ones that don't use RethinkDisplay(); require OS 3.0+.  And since I
  6312.    am making the game compatible with all OS's it is useless to me.
  6313.  
  6314. * DOUBLE-BUFFERING of rastports/bitmaps implemented for pentagrams
  6315.   (finally!).  Now they are rock solid, _except_ for during high CPU load
  6316.   times (like while downloading from the internet on standard serial port)
  6317.   During high cpu load they flicker a bit sometimes.
  6318.   I haven't tested it on A500 yet.
  6319.  
  6320. **************************************************************************
  6321. *******                ADPCM asm routines upgrade                  *******
  6322. **************************************************************************
  6323.  
  6324. ADPCM stands for Advanced Delta Pulse Code Modulation.
  6325.  
  6326. It is a lossy compression algorythm which is supported by the Zyxel Voice
  6327. modems and various voicemail packages.
  6328.  
  6329. I intend to use ADPCM audio compression technology to reduce the storage
  6330. requirements of the speech samples of Chaos.  This is useful for persons
  6331. such as SAI who have limited hard drive space.
  6332.  
  6333. I do not intend to compress the "sound effects" of the game.  Only the
  6334. speech samples because there are going to be hundreds of speech samples.
  6335. The game will soon have about 10 megs of uncompressed speech which will
  6336. be only 2.5 megs compressed.
  6337.  
  6338. ADPCM3 is the 3-bit algorythm.  It compresses sound to an 8:3 ratio.
  6339. ADPCM2 is the 2-bit algorythm.  It compresses sound to a  4:1 ratio.
  6340.  
  6341. ADPCM3 produces better sound quality but at the expense of taking a lot
  6342. more CPU cycles to do it.
  6343.  
  6344. ADPCM2 sounds noticeably worse than a standard Amiga sound sample but
  6345. speech samples still sound MANY times better than the algorythmically
  6346. generated speech of translator.library.
  6347.  
  6348. I have NO intention of using ADPCM3 compressed sound in Chaos.
  6349. If you want sound quality then don't compress.
  6350. If you want small size then compress with ADPCM2.
  6351. So there is no need to use ADPCM3.  I'm just including it for orthogonality
  6352. and because the routine is so small.
  6353.  
  6354. The beginning of this upgrade starts with Christian Buchner's
  6355. asm coded ADPCM routines as a starting point.
  6356.  
  6357. I will optimize them for maximum speed.
  6358.  
  6359. * ADPCM2_Decrunch routine
  6360.  
  6361.   REVISION 1+2 combined together:
  6362.   For every byte that gets decompressed James Conwell has:
  6363.   1. Eliminated 6 instructions and
  6364.   2. Replaced 4 slow instructions with 4 fast ones and
  6365.   3. Eliminated 4 bus accesses. (*Very* important on A1200 with no Fast Ram) and
  6366.   4. Eliminated 3 bus accesses for every 4 bytes written.
  6367.  
  6368.   ACK!  I just realized that my main loop is 256 bytes long!
  6369.   due to the 16-byte cacheline properties of the 020 and 030 this
  6370.   will almost NEVER fit into the cache.  In order to make sure your code
  6371.   fits in the cache you must keep your main loop down to 240 bytes!
  6372.   My next revision of this routine will fix this.
  6373.  
  6374.   REVISION 3:
  6375.   Main loop now takes only 194 bytes.
  6376.   Saved 14 cycles per decompressed byte on 68000.
  6377.   Saved  6 cycles per decompressed byte on 68030.
  6378.  
  6379.   REVISION 4: was a failure.
  6380.   I attempted to replace the multiply,add,asl instruction set with a
  6381.   256 entry lookup table.  Since the variable having all the math done
  6382.   on it is the delta and since a sample is only 1 byte big, I figured the
  6383.   largest delta one could possibly generate would be 255.  So I'd have
  6384.   a nice little table of 256 words which would save me 78 cycles per
  6385.   decompressed byte.
  6386.   Hours later... it didn't work... after investigation it turns out that
  6387.   the delta is unboundedly large.  I ran 2 sound samples through the
  6388.   algorythm and the delta reached a maximum of 15944!!!  Ack.
  6389.   Stupid algorythm.
  6390.  
  6391.   Current Standing:
  6392.   The main loop takes 212 cycles.
  6393.   So on my standard 22,000 samples per second sounds it will take
  6394.   4,664,000 cycles per second on an M68000.  That is 65% of all available
  6395.   CPU power just to decompress the audio stream!
  6396.  
  6397.   REVISION 5:
  6398.   Ok I figured out how to use the table or do the math the slow way
  6399.   depending on the size of the delta.
  6400.   During a quiet sound sample this allows me to save an average of 62
  6401.   cycles per decompressed byte.
  6402.   During a noisy sound sample this allows me to save an average of 54.1
  6403.   cycles per decompressed byte. (save 62 cycles 93.2% of the time, waste
  6404.   54 cycles 6.8% of the time)
  6405.  
  6406.   I Strategically layed out the code for maximum speed and minumum size.
  6407.  
  6408.   This is what I love about coding for the 020 and 030;  their 256 byte
  6409.   on-board L1 Cache.  It makes the geographic layout of your code very
  6410.   important. You must strategically lay out all your branches because
  6411.   their geographic location in the code is important.  Its TOTALLY COOL.
  6412.   Asm programming is the ultimate strategy game!
  6413.  
  6414.   Current Standing:
  6415.   The main loop takes an average of 157.89 cycles during a noisy part
  6416.   of a sound sample.
  6417.   So on my standard 22,000 samples per second sounds it will take
  6418.   3,473,536 cycles per second on an M68000.  That is 48.5% of all available
  6419.   CPU power just to decompress the audio stream!
  6420.  
  6421.   This algorythm cries out for the power of the 020's barrel shifter
  6422.   and faster mulu instruction.
  6423.  
  6424.   I can make an optimized version of this routine for 020+ by replacing
  6425.   all those add.w d2,d2 commands with the 020+ SCALED index addressing
  6426.   mode.  Such a routine would REQUIRE an 020+ to run.
  6427.  
  6428.   DRAT!  I was all ready to declare this routine "FINISHED" but
  6429.   unfortunately my main loop is 248 bytes!  It will only fit into the
  6430.   020/030 cache half of the time! 8(
  6431.  
  6432.   I will now make 2 slightly different versions of this routine.
  6433.   _000 for 68000
  6434.      This routine unchanged.
  6435.      This routine writes its data to chipram a longword at a time. (4 bytes)
  6436.      This routine runs on any M680x0 series processor.
  6437.  
  6438.   _020 for 68020 and up
  6439.      This routine with all the add.w d2,d2 replaced with the *SCALE
  6440.      addressing mode.  This will only speed things up by 2 cycles on 030
  6441.      so the main reason for using *SCALE is to reduce the main loop size
  6442.      by 16 bytes from 248 down to 232 so that the main loop will ALWAYS
  6443.      fit into the onboard L1 cache.
  6444.      This routine writes its data to chipram a longword at a time. (4 bytes)
  6445.      This routine REQUIRES an M68020 or higher processor.
  6446.  
  6447.   NOTE: I have coded many asm routines for use with many C and Basic
  6448.   programs but this is the very first time I made 2 different versions of
  6449.   the same routine.  Usually I didn't need to make 2 different versions
  6450.   due to there not being any advantage to doing so.  On a few occassions
  6451.   I could have made 2 or 3 different versions optimized for different
  6452.   processors but it wasn't important enough to bother.
  6453.  
  6454.   OOPS I just figured out another optimization to save 4 cycles in the main
  6455.   loop.  I replaced btst #1,d1 (10 cycles) with btst d7,d1 (6 cycles)
  6456.  
  6457.   Combined with earlier speedups,
  6458.   during a noisy sound sample this allows me to save an average of 57.56
  6459.   cycles per decompressed byte. (save 66 cycles 93.2% of the time, waste
  6460.   58 cycles 6.8% of the time)  This optimization also saved another 6 bytes
  6461.   in the main loop
  6462.  
  6463.   FINAL STANDING
  6464.   The main loop takes an average of 154.432 cycles during a noisy part
  6465.   of a sound sample.
  6466.   So on my standard 22,000 samples per second sounds it will take
  6467.   3,397,504 cycles per second on an M68000.  That is 47.46% of all available
  6468.   CPU power just to decompress the audio stream!
  6469.  
  6470. * ADPCM3_Routine: Ok I rewrote this routine several times and kept speeding
  6471.   it up.  Eventually I got to a point where I can do something radical that
  6472.   the Motorola book says will be faster on 000 - 040 but I didn't trust it
  6473.   so I wrote the routine 2 different ways and was then going to race them.
  6474.   I copy & pasted the timing code from Chaos into the adpcm routine but
  6475.   all it did was give me total GARBAGE results that had nothing to do with
  6476.   anything.  That timer() routine is just useless. 8(
  6477.  
  6478. ALL ADPCM routines still need more work and are on hold until I can time
  6479. the various methods.
  6480.  
  6481. **************************************************************************
  6482. *******       END of ADPCM Asm Routines Upgrade for now            *******
  6483. **************************************************************************
  6484.  
  6485.  
  6486.  
  6487. January 6th, 1999: I've now been working on Chaos for 2 years.
  6488. A lot was accomplished this year but not nearly enough for my tastes.
  6489. Due to the demands of trying to design the world's best strategy game and
  6490. work a day job I just didn't get enough done.  I'm very dissatisified that
  6491. I still haven't got the music and digital sound effects upgrade installed,
  6492. even though this is actually the very first thing I wanted to do 2 years ago.
  6493.  
  6494. STATUS REPORT:
  6495. There are 132 creatures in the game.
  6496. There are 128 Magic spells
  6497. There are  37 inanimate objects
  6498. There are   7 growths
  6499. There are 304 items total.
  6500.  
  6501. The main program for v2.3d is 366536
  6502. chaos.dat is 66368
  6503. Archive size is 500k.
  6504.  
  6505. * PRIVATE functions instead of static.  Using the word "static" to mean
  6506.   "private" just doesn't make sense to me.  So JC now supports the use
  6507.   of the keyword PRIVATE for making a function private to a particular
  6508.   file.
  6509.  
  6510. * Put in a Vblank_Counter variable into animatorasm that gets incremented
  6511.   once each vblank so I have a reliable method of timing things.  Obviously
  6512.   there will be tremendous roundoff error on timing small things but it will
  6513.   be ok for long operations.
  6514.  
  6515. * NEW Asm routines: TestPixel4_320, TestPixel1_320, TestPixel4_640 and
  6516.   Test_Pixel1_640.  We no longer use the old TestPixel4 and TestPixel1
  6517.   routines.  We now use these new faster routines.  Since we only use
  6518.   rastports of 640 or 320 pixels width I made these routines take advantage
  6519.   of that fact.  These new routines are 58 cycles faster on 68000.
  6520.   The old routines are still available in case we ever need to use them on
  6521.   a strangely shaped bitmap/rastport.
  6522.  
  6523. * New global variables LoResBitPlane and HiResBitPlane.  These are pointers
  6524.   to the first byte of the first bitplane of the LoRes/HiRes screens.
  6525.   This is a pointer to the actual data, NOT a bitmap structure.
  6526.   These pointers are required for the new TestPixel routines because the
  6527.   new routines don't take a pointer to a rastport struct as a parameter,
  6528.   instead they take a pointer to the first byte of actual data of the
  6529.   first bitplane.
  6530.  
  6531. Timing Results for 1 million calls on 25Mhz 68030
  6532. Times measured in Frames.  (There are 50 frames per second)
  6533.                OS ReadPixel  TestPixel4_320  TestPixel1_320
  6534. Frames             2970         398             291
  6535. Calls/frame         336.7      2512.6           3436.4
  6536. Speed Increase        1x          7.46x           10.2x
  6537.  
  6538.  
  6539. Timing Results for 1 million calls on 7.15909 Mhz 68000
  6540. Tested on A2000 with 1 meg chip + 8 megs fast ram.
  6541. 126 frames to do nothing; this is subtracted from the results.
  6542.                OS ReadPixel  TestPixel4_320  TestPixel1_320
  6543. Frames             8272        2070             1577
  6544. Calls/frame         120.9       483.1            634.1
  6545. Speed Increase        1x          4x             5.25x
  6546.  
  6547.  
  6548.  
  6549. ADPCM process/task will
  6550. 1. Use right channel.  So that the left channel of algorythmic audio can
  6551.    play simultaneously if needed.
  6552. 2. CTRL-C means to Cancel (abort) playback of the audio.  The adpcm task
  6553.    aborts its current playback (if any) and then waits for more commands.
  6554. 3. CTRL-D means DIE.  Kill the task at the end of the game.
  6555. 4. CTRL-E to start play back.  Set up some variables then send the
  6556.    Chaos_ADPCM_Task a ctrl-e and it will start playing the specified file.
  6557. 5. If the Chaos_ADPCM_Task should ever stop playing for any reason then
  6558.    it will send the main task a CTRL-F (F=Finished).
  6559.    It doesn't matter _why_ it stopped playing.  If it stops playing for any
  6560.    reason it signals that it is finished with CTRL-F.
  6561.    So if the sound sample has completed playback, or it couldn't get the
  6562.    audio channel allocated or it couldn't find the file or the file had a
  6563.    read/write error or the task was told to stop with CTRL-C, then it signals
  6564.    a CTRL-F back to the main task right before it begins waiting for the
  6565.    next command.
  6566.  
  6567.  
  6568. 68030 timings Using supermegainline version of ADPCM3 decrunch
  6569. Main loop is much larger than 256 bytes.
  6570.  17956 ADPCM_000.lib          JC
  6571. Filesize Filename           Frames
  6572.  19585 LetsPlayChaos.adpcm3   15
  6573.  13060 LetsPlayChaos.adpcm2    8
  6574.  
  6575. 195100 ChaosRules.adpcm3     157
  6576. 130070 ChaosRules.adpcm2      78
  6577.  
  6578.  17484 ADPCM_020.lib  with a routine that fits into the 256 byte cache
  6579.  19585 LetsPlayChaos.adpcm3   13
  6580.  
  6581. 195100 ChaosRules.adpcm3     128  18.5% faster
  6582.  
  6583. So even though the megainlined version saves 2 instructions (bsr/rts) for
  6584. each byte decompressed, we still lose speed overall because the main loop
  6585. becomes so big that it won't fit into the cache of the 020/030.
  6586.  
  6587. According to the timing charts the megainlined version should have been
  6588. faster on all CPUs.
  6589.  
  6590. * I made 2 versions.  1 optiminzed for 000 and one optimized for 020.
  6591.   ADPCM_000.lib and ADPCM_020.lib
  6592.  
  6593. * NOTE about OS compatibility: If the game were ever to require OS 2.04
  6594.   or higher (which I assume it will when we make the game internet-capable)
  6595.   then we can replace all occurences of CreatePort with CreateMsgPort
  6596.   and all occurrences of DeletePort with DeleteMsgPort and all occurrences
  6597.   of CreateExtIO with CreateIORequest and all occurrences of DeleteExtIO
  6598.   with DeleteIORequest then we could stop linking with amiga.lib and
  6599.   hopefully save some bytes on the executable filesize.
  6600.  
  6601. * MAKEFILE improved with new options: demo_020, release_020 and
  6602.   releasewithleveleditor_020.  These options compile all JC code using
  6603.   68020 instructions and optimizations and link with the 020 version
  6604.   of ADPCM lib.  This way all low end users will get a version of the game
  6605.   that makes MAXIMUM use of their limited processing power.
  6606.  
  6607. smake demo_020 produces a filesize of 338360
  6608. smake demo     produces a filesize of 342312
  6609.  
  6610. * STRANGE: On December 25th, 1998  the filesize of the demo was 366536.
  6611.   Since then I've added about 1k of asm code, 500 lines of JC code and
  6612.   about 18k of lookup tables yet somehow the filesize has SHRUNK by 24k!
  6613.   The only thing I can figure is I must have forgot to do a smake clean
  6614.   before doing smake demo on Christmas day, thus I was using unoptimized
  6615.   code.
  6616.  
  6617.                        ADPCM DECRUNCH ROUTINES
  6618.                   Christian Buchner vs. James Conwell
  6619.      Using the current versions of the routines on January 16th, 1999
  6620.  
  6621. On all timing tests the display mode is the standard Chaos split screen
  6622. 320x256x5 bitplanes and 640x256x3 bitplanes.
  6623.  
  6624. 68000 with 8 megs fast and 1 meg chip.
  6625.                               CB     JC
  6626. Filesize Filename           Frames Frames
  6627.  19585 LetsPlayChaos.adpcm3  152    101  1.5x faster
  6628.  13060 LetsPlayChaos.adpcm2  134     61  2.2x faster
  6629.  
  6630.  
  6631. 68030 with 12 megs fast and 2 megs chip.
  6632.  19585 LetsPlayChaos.adpcm3   17     13
  6633.  13060 LetsPlayChaos.adpcm2   15      8
  6634.  
  6635.  195100 ChaosRules.adpcm3    165    128  1.3x faster
  6636.  130070 ChaosRules.adpcm2    152     76  2x faster exactly
  6637.  
  6638.  
  6639.  
  6640. There wasn't enough chipram available to easily test the "Chaos Rules" 500k
  6641. sample on my 68000 based amiga so I just skipped it.
  6642.  
  6643. * TESTED the adpcm3 playback routine on 26.5 Khz sound samples from a floppy
  6644.   drive on my 25Mhz 030.  WORKS PERFECTLY.  No skipping.  It plays the samples
  6645.   back straight off the floppy using double-buffering.
  6646.  
  6647. * TESTED the adpcm3 playback routine on 26.5 Khz sound samples from a floppy
  6648.   drive on my 7Mhz 000.  SERIOUS buffer underflow.  The routine would need to
  6649.   be at least twice as fast as it currently is to work on the 7Mhz 68000.
  6650.   Even if I put in the 24k lookup table + all my other tricks I can't make
  6651.   it go twice as fast as it already is.
  6652.  
  6653. * TESTED the adpcm2 playback routine on 26.5 Khz sound samples from a floppy
  6654.   drive on my 7Mhz 000.  Small amounts of buffer underflow for each buffer.
  6655.   So that a long sound sample skips a bit here and there or crackles.
  6656.   Sometimes the head has to seek to the next part of the file and there is a
  6657.   BIG skip. 8(  Hopefully all will be fine once I cut the sampling rate in
  6658.   half to 11Khz for the floppy disk version.  The hard drive version will
  6659.   still use the 22Khz sounds.
  6660.  
  6661.   It would really help if the floppy version could use a fast file system
  6662.   floppy.  But, alas, that requires OS 2.04 or higher.
  6663.  
  6664. * BUG in my 8svx datatype.  I squished my sound samples down to 11k but
  6665.   now x2adpcm can't convert it due to a silly bug in the 8svx datatype.
  6666.   So all my sound upgrading is on hold till I get a new internet account
  6667.   and download the latest version of the 8svx datatype.
  6668.  
  6669. * Sent off for a new internet account on January 16th, 1999.  It costs
  6670.   $240.00 for 1 year and has dialups all over the USA and Canada.
  6671.  
  6672. * Changed wizard names to names that actually mean something to me.
  6673.   This makes the game a lot more fun for me.
  6674.  
  6675. SETBACK: I can't get the fake seglist code from the RKRM manual to work.
  6676. I just get strange problems.  So my new Chaos_ADPCM_Process won't work.
  6677. I must either wait to get my new internet account to find out what's going
  6678. on or I must really load the code off of disk and communicate to it with
  6679. messages instead of just signals like I am doing currently.
  6680. I own many Amiga programming books but none of them explains how to create
  6681. a process using some code that is already in your program.  This
  6682. information might be in the AmigaDOS Developers book but I don't have that.
  6683.  
  6684.  
  6685. Dear SAI: I really hate the bipedal generators in their current form.
  6686. So we should do one of the following:
  6687. A) Set bipedal generators to generate at the same frequency as standard
  6688.    generators.
  6689. B) Have yet another setup screen that appears when Generators>0
  6690.    that allows us to turn on/off which types of generators we will
  6691.    get.  A "Generators Setup Screen".
  6692.  
  6693. I prefer option A simply because its the least work while making the game
  6694. meet my wants.  If you don't like option A then we'll have to do option B.
  6695.  
  6696. * CHANGED: Bipedal Generators to generate at the same rate as Aviaries.
  6697.  
  6698. PROBLEM: The pearl.font isn't being used in the game when I play it
  6699. on my OS 1.3 amiga.  ??????????????????
  6700. Ok, I made some changes.  Maybe this is fixed now.
  6701.  
  6702.  
  6703. * James opens a can of "WHOOP ASS".
  6704. * James guggles down the whole thing.
  6705. * James rewrites line of sight testing to be 9x faster than present,
  6706.   21x faster than it was originally. Boring details follow:
  6707.  
  6708. *******************  LINE OF SIGHT SPEEDUP UPGRADE *******************
  6709.  
  6710. Timing test of line of sight routine on a clear board with a wizard
  6711. in each corner pressing the L key. The animator task is stopped but the
  6712. color cycler task is running at full speed.
  6713.  
  6714.                   68030        68000
  6715. Bottom Left  Corner: 26 frames 181
  6716. Bottom Right Corner: 28 frames 181
  6717. Upper  Left  Corner: 27 frames 180
  6718. Upper  Right Corner: 27 frames 180
  6719.  
  6720. I massaged the C code a bit to use WORDS instead of ints but this actually
  6721. made it 4 frames slower! (?)  Put it all back to ints.
  6722.  
  6723. C optimization 1.: saved 1 frame on 030.
  6724. Every corner now   : 25 frames
  6725.  
  6726. C lookup table implemented:
  6727.  
  6728.                   68030        68000
  6729. Bottom Left  Corner: 12 frames  92
  6730. Bottom Right Corner: 12 frames  92
  6731. Upper  Left  Corner: 12 frames  90
  6732. Upper  Right Corner: 12 frames  90
  6733.                    2.25x        2x times faster
  6734.  
  6735. C optimization 2.
  6736.                   68030        68000
  6737. Bottom Left  Corner: 10 frames  ?? 
  6738. Bottom Right Corner: 10 frames  
  6739. Upper  Left  Corner: 10 frames  
  6740. Upper  Right Corner: 10 frames  
  6741.                    2.7x
  6742.  
  6743. C optimization 3. (optimized AutoAccept())
  6744.                   68030        68000
  6745. Bottom Left  Corner:  8 frames  ??
  6746. Bottom Right Corner:  8 frames  
  6747. Upper  Left  Corner:  8 frames  
  6748. Upper  Right Corner:  8 frames  
  6749.                    3.37x
  6750.  
  6751. C optimization 4. (precalc all AutoAccept())
  6752.                   68030        68000
  6753. Bottom Left  Corner:  7 frames  68
  6754. Bottom Right Corner:  7 frames  68
  6755. Upper  Left  Corner:  7 frames  68
  6756. Upper  Right Corner:  7 frames  68
  6757.                    3.85x         2.65x times faster
  6758.  
  6759. Now I will rewrite the inner loops in optimized assembly language.
  6760.                   68030        68000
  6761. Bottom Left  Corner:  3 frames  27
  6762. Bottom Right Corner:  3 frames  27
  6763. Upper  Left  Corner:  3 frames  27
  6764. Upper  Right Corner:  3 frames  27
  6765.                      9x       6.66x times faster
  6766.  
  6767. Added special optimized code for handling straight lines and 45 degree angles.
  6768.                   68030        68000
  6769. Bottom Left  Corner:  3 frames  24
  6770. Bottom Right Corner:  3 frames  24
  6771. Upper  Left  Corner:  3 frames  24
  6772. Upper  Right Corner:  3 frames  24
  6773.                       9x       7.5x times faster
  6774.  
  6775. C COMPILER BUG: a line like this screws everything up and reports bogus
  6776. errors:
  6777. ELSE // up to left \
  6778.  
  6779.  
  6780. Absorbed isLineOfSightTestQ into isLineOfSightQ
  6781.                   68030        68000
  6782. Bottom Left  Corner:  3 frames  23
  6783. Bottom Right Corner:  3 frames  23
  6784. Upper  Left  Corner:  3 frames  23
  6785. Upper  Right Corner:  3 frames  23
  6786.                       9x       7.8x times faster
  6787.  
  6788. If I was completely psychotic I could save 1 last frame on the 68000
  6789. version only.
  6790.  
  6791. Just for fun I went back and put in the original line of sight testing
  6792. code from v1.7 (this is before I put in those optimizations in 1997)
  6793.                   68030        68000
  6794. Bottom Left  Corner: 63 frames  392
  6795. Bottom Right Corner: 63 frames  392
  6796. Upper  Left  Corner: 64 frames  390
  6797. Upper  Right Corner: 63 frames  392
  6798.                      21x         17x times faster
  6799.  
  6800. ******************** END LINE OF SIGHT SPEEDUP UPGRADE *******************
  6801.  
  6802. * Made algorythmic sound effects allocate/deallocate the sound channel.
  6803.   Now that it no longer hogs a sound channel at max priority I can add
  6804.   ingame music.
  6805.  
  6806. Tuesday, Jan. 26th.  Melissa and Mike got busted/bluffed by mike's wife
  6807. for cheating on her. Lots of crap.  No work accomplished.
  6808.  
  6809. * CLASSIC: Ogre Mage, Standard Wall, Weak Wall, Rock, Speed and Slow
  6810.   are now CLASSIC.
  6811.  
  6812. * CHANGED: Impurities and Agent Casting can no longer be set using the
  6813.   ingame menus.  I had to do this to pave the way for the internet upgrade.
  6814.   We can only allow the user to change settings during the game which do
  6815.   not materially affect gameplay.  Things which materially affect gameplay
  6816.   must be set _once_ at the beginning of the game and then remain unchanged
  6817.   for the duration of that game.  Replaced MENUImpure and MENUAgents with
  6818.   the global variables "Impurities" and "AgentCasting".
  6819.   At some point I'll use the empty space for music and sound effects
  6820.   options.
  6821.  
  6822. * Placed Impurities and AgentCasting on setup screen and in savegame file.
  6823.   This means the savegame format has changed so previously saved games
  6824.   will no longer load correctly. Tested and verified, I loaded an old
  6825.   savegame and the whole game locked up but at least the computer didn't crash.
  6826.  
  6827. * FLAW: (at least I assume this is a flaw).  I had a stone giant stand on
  6828.   top of a dead stone golem.  Each turn the computer players would justice
  6829.   or dark power my Stone Giant and it would be reinstated as a stone golem.
  6830.   then the next player would justice my new stone golem and it would go
  6831.   back to being a Stone Giant. ad infinitum.  This is caused by the fact
  6832.   that justice and dark power leave corpses behind when in previous versions
  6833.   they did not.  Anyway I changed it so that Justice/DarkPower/Exorcise/etc.
  6834.   do not leave corpses behind anymore.  FIXED and TESTED.
  6835.  
  6836. * BUG: C for CAST does not work on the second Justice/DarkPower/speed/slow
  6837.   etc. (any multiplicity spell I guess.)   Strangely, the C key works for
  6838.   Shadow Woods and other trees.  Ok, I traced this to a problem in the
  6839.   spell files where the target of the spell is highlighted with the
  6840.   highlight sprite.  The C key uses the position of the HighLight Sprite
  6841.   for determination of who the caster is.  This information was being
  6842.   lost.  NOW FIXED in every spell file.
  6843.  
  6844. It would be really nice if we could position wizards with cut and paste
  6845. in the level editor.  We could then design multiplayer levels much more
  6846. easily.  This is something both Joseph and James have been wanting.
  6847. Leaving this for SAI.
  6848. SAI: The editor now has fragile support for this.
  6849.  
  6850. * The turn number is now displayed on the New Game and Quit Game requesters.
  6851.  
  6852. I've wasted quite a bit of time the last few weeks due to trying to
  6853. maintain OS 1.3 compatability.  I've had major problems which are still
  6854. not solved with the ADPCM process.  I think
  6855. that if I was using OS 2.04+ routines that these problems would simply
  6856. not exist.  Therefore there is a very real possibility that I will
  6857. make the game require OS 2.04+ very soon.
  6858.  
  6859. * Disrupt no longer kills scrolls + I added the following sentence to the
  6860.   description:  "This spell currently does not affect wizards, growths,
  6861.   inanimate objects or scrolls."
  6862.  
  6863. * various changes to docs.
  6864.  
  6865. * Feb 8th, 1999: Downloaded the latest 8svx and sound datatypes.
  6866.   Downloaded the ZXAM20b.lha emulator from aminet.
  6867.  
  6868. * FLAW: At beginning of Spell Selection phase there is still text left over
  6869.   at the bottom from the movement phase. FIXED.
  6870.  
  6871. * LIST PROCESSING implemented for the sentence generation of what wizards
  6872.   say during their spell selection.  There are now around 20x as many things
  6873.   that they can say without taking 20x the memory.  It's extremely easy to
  6874.   edit the TalkLists file and add new stuff in, you don't even have to
  6875.   recompile!  I took this code from a True Basic paragraph generator that I
  6876.   made a few years ago.  Only I didn't bother to translate all the paragraph
  6877.   stuff.  Just the 1-line sentence generation and list processing stuff.
  6878.  
  6879. * WriteNearBottom can now handle 2 lines of text.
  6880.  
  6881. * BUG: a computer wizard cast Alliance but then didn't actually cast it on
  6882.   anyone.  Or at least he didn't get any allies by casting it.  This has now
  6883.   happened 10 to 12 times. When playing a game with no generators the
  6884.   Alliance spell always works.  The problem is that the computer wizards
  6885.   always try to ally themselves with the Independents when independents are
  6886.   available but the spell is programmed to fail when applied to an Independent
  6887.   creature. NOW FIXED.
  6888.  
  6889. * ADDED New CastInfo bits: CAST_NOINDEPENDENTS and CAST_NOASLEEP so that it
  6890.   it is illegal to cast Alliance on independent or sleeping creatures.
  6891.   It is now illegal to cast sleep on sleeping creatures too. This will help
  6892.   prevent the computer players from doing stupid stuff.
  6893.  
  6894. * CHANGED: CAST_UNDEAD to CAST_MUSTBEUNDEAD.
  6895.  
  6896. BUG:  If you select "quit" from the menu and then click the checkmark then
  6897. some enforcer hits are generated.  When I run the game under CPR, the game
  6898. simply locks up and does not quit.  Note to SAI:  Does any of this happen
  6899. on your system?  Note from JC:  I fixed this bug months later on October
  6900. 21st, 1999.
  6901.  
  6902. * BROKEN: Aviaries, Dragon Nests and Bipedal Generators never generate
  6903.   anything anymore 8(  (at least not when playing with 8 wizards.)
  6904.   I just played a test game against 8 wizards and 4 generators and the
  6905.   generators NEVER generated anything.  Ok, this is because I had
  6906.   AgentCasting turned off.  I have NOW FIXED this so that even with
  6907.   AgentCasting off, the generator agents still generate.
  6908.  
  6909. * MAJOR BUG: A computer wizard just attacked his own elephant!  This might
  6910.   be because he was beside it and was "engaged" to it or perhaps he tried to
  6911.   mount it?  Lucky for him his elephant didn't attack him back, it charged
  6912.   toward the nearest enemy instead.  The bug was in ChooseDestination().
  6913.   NOW FIXED.
  6914.  
  6915. * BUG: Computer Wizards keep trying to mount meditations which are already
  6916.   occupied. NOW FIXED.
  6917.  
  6918. * BUG: A computer Wizard just cast Animate on turn 1 and then nothing
  6919.   happened.  It didn't say what he cast it on.  It didn't say he aborted it.
  6920.   OK, he didn't have any inanimate objects so "nothing" is exactly what was
  6921.   supposed to happen.  I modified isStupidCast to check for this but
  6922.   I have NO idea if my player number is correct or off by one.
  6923.   NEVER MIND: I have eliminated the "player" parameter from isStupidCast.
  6924.   It now gets its player information directly from CasterCell, thus permanently
  6925.   and forever solving the off by 1 player number problem for this routine.
  6926.   NOW FIXED.
  6927.  
  6928. * BUG: Computer wizards routinely waste Subversion type spells on creatures
  6929.   which are being ridden.  I don't know why FLAG_NOWIZARDCELL doesn't prevent
  6930.   this from happening.  Sleep spells are wasted this way too. Leaving for SAI.
  6931.   SAI: Well I looked at the code for this and I can't see anything wrong
  6932.   with it. But I think I have seen this happen as well. I'll investigate.
  6933.   SAI: Found and nailed the bug. NOW FIXED. Details appear later.
  6934.  
  6935.  
  6936. HandeIDCMP changes:
  6937. * I took out that ActivateWindow() call because it was annoying me by
  6938.   transfering my input to chaos when I am in the middle of using another
  6939.   program, such as web browsing or CED etc.
  6940. * Added an ActivateWindow() call to activate the main window whenever
  6941.   you click in the Hires window.
  6942. END HandleIDCMP changes
  6943.  
  6944. * FLAW: Dark Wood, Speed and Slow spell descriptions do not show how many
  6945.   attempts of each you get. FIXED.
  6946.  
  6947. * ADDED: DO_THIS to JC.h and JCformat.c.  Its just like DO_FOREVER.  For
  6948.   some reason every time I see DO_FOREVER my brain expects the whole loop to
  6949.   execute forever even though there could be an exit condition in the
  6950.   LOOP_WHILE or LOOP_UNTIL.  So I just made a DO_THIS.
  6951.  
  6952. * All spells which start with the letters "a"-"g" have been upgraded to JC.
  6953.  
  6954. * BUG: The "Destroy Wall" spell destroys walls but does not reveal what the
  6955.   wall was covering.  If the wall was covering a scroll or artifact or corpse
  6956.   or etc. then it is destroyed.  FIXED by changing
  6957.   InsertCreature(cell,NOTHING,NOTHING) into RestoreCell(cell)
  6958.   I can't think of any time that we should be inserting a NOTHING into a
  6959.   cell.  If we want to get rid of an object then we must use RestoreCell(cell)
  6960.   so that any covered objects are revealed.  If we want to insert a creature
  6961.   then we should just InsertCreature(cell,CreatureID,Player)
  6962.  
  6963.   If you really want to wipe out an entire cell then just call:
  6964. void ClearCell(int cell)
  6965. FUNCTION
  6966.   ObtainSemaphore (&BoardLock); 
  6967.   ClearVisible(cell);
  6968.   ClearUnder(cell);
  6969.   ReDrawCell(cell);
  6970.   ReleaseSemaphore(&BoardLock);
  6971. END_FUNCTION
  6972.  
  6973. * BUGS: Boil, Quench and Still all have the same bug as Destroy Wall.
  6974.   ALL NOW FIXED.
  6975.  
  6976. * ALL occurrences of InsertCreature(cell,NOTHING,NOTHING) removed from
  6977.   every where!  Most were replaced with
  6978.   ClearUnder(cell), ClearVisible(cell), RedrawCell(cell)
  6979.   Now I went back and replaced those code sequences with ClearCell(cell)
  6980.  
  6981. * FLAW: RestoreCell(cell) does not call RedrawCell(cell) like other core
  6982.   routines do.  Since RestoreCell will often change what needs to be drawn
  6983.   there I made it do it automatically. FIXED.
  6984.  
  6985. * BUG: I played a game with 99 hidden scrolls and 99 hidden artifacts and 2
  6986.   wizards and the the initial "Repulsion" messed up the color pallette of the
  6987.   game.  There was a place where the code did a return without reloading
  6988.   the original colour pallette. FIXED.
  6989.  
  6990. * BUG: Animate destroys any item which is under the item being morphed.
  6991.   Corpses, artifacts, scrolls, etc are being destroyed this way.  FIXED.
  6992.  
  6993. * BUGS: Alter Reality, MassMorph and Mutate have the same bug as Animate.
  6994.   ALL FIXED NOW.
  6995.  
  6996. * Nuke destroys the entire cell and I left it that way.
  6997.  
  6998. * CHECKED over every occurrence of InsertCreature in every spell file and
  6999.   everything looks good.
  7000.  
  7001. Question for SAI: I was working on IntelligentMagicWoodCasting and I just
  7002. always assumed that if a wizard was warped off the board then GetWizardCell(p)
  7003. would return -1.  But that is not the case.  GetWizardCell() has no special
  7004. code to handle warped wizards.  Is GetWizardCell going to tell me the
  7005. last position of the wizard when he was on the board?  ??
  7006. Should any of this be changed?
  7007. SAI: This indeed sounds bad. NOW ALLEGEDLY FIXED
  7008.  
  7009. * NEW stuff to be used with my upcoming IntelligentMagicWoodCast(CasterCell)
  7010. * NEW functions sqDistanceFromNearestTeamWizard (CasterCell,cell) and
  7011.                 sqDistanceFromNearestEnemyWizard(CasterCell,cell) which
  7012.   return the sqDistance from cell to the nearest (team/enemy) wizard.
  7013.   Team info is extracted from CasterCell.  CasterCell is only used to
  7014.   determine which team is being dealt with.
  7015. * NEW predicates: isTree, IsTree and isIDTree.
  7016.  
  7017. *** Playtesting ***
  7018. Playtested 1 game, here is what I found.  I controlled 1 wizard against
  7019. 7 enemy wizards.  Nobody was in an alliance. No scrolls, no artifacts.
  7020. 99 spells. 0 turns. Texas Trash'em. 4 generators.  
  7021.  
  7022. * BUG: I was player 2.  Player 8 killed player 3 and somehow all the foes
  7023.   vanquished from the player 3 wizard got put onto my wizard. NOW FIXED
  7024.   (see far below)
  7025.  
  7026. * BUG: Player 6 just killed my orc with his wizard but it put the orc on
  7027.   _my_ wizard's Foes Vanquished.  NOW FIXED (see far below)
  7028.  
  7029. * BUG: uhmmm every wizard that I can see has the exact same Foes Vanquished
  7030.   list. NOW FIXED (see far below)
  7031.  
  7032. I Won the game in 22 turns (This is not a bug :)
  7033.  
  7034. * BUG: After winning it showed the score window and the window title sort of
  7035.   says "Player scores for turn 22" but the first 4 bytes of "Player" are all
  7036.   messed up. Ok, this is happening anytime I click in the HiResWindow.  I
  7037.   don't know why the title gets trashed, it might be a symptom of a serious
  7038.   problem but I have simply worked around it by changing the Wait().
  7039.   Technically the bug is still there, you just don't notice it so much
  7040.   since the window immediately gets closed and reopened.
  7041.  
  7042. started a new game identical to the last one:
  7043. * BUG: Wizards 2,3,4 say "Foes Vanquished 0" on their info screen.
  7044.   Wizards 1,5,6,7,8 have a big blank spot instead. NOW FIXED (see far below)
  7045.  
  7046. Ok, now I completely quit the game, then did "run chaos" from shell.
  7047. Now all the wizards say "Foes Vanquished 0" like they are supposed to.
  7048. *** END Playtesting ***
  7049.  
  7050. * Fixed Eye for an Eye, Torment, Nuke, Free, Alter Reality spell descriptions.
  7051.  
  7052. * CHANGED:
  7053.   isWizard      to isExposedWizard
  7054.   IsWizard      to IsExposedWizard
  7055.   FLAG_NOWIZARD to FLAG_NOEXPOSEDWIZARD
  7056.   to make the code more understandable.
  7057.  
  7058. * Scroll Delay now defaults to 0.
  7059.  
  7060. ** Playtest game **
  7061.  
  7062. * BUG: My ally cast Magic Shield on my Basalt Golem yet its Magic Resistance is
  7063.   still 0.  This happened after most of the other wizards had been killed
  7064.   off. ??? I just cast Magic Shield on myself on turn 1 of a new game and it
  7065.   had no effect! The recovery code was messed up.  NOW FIXED.
  7066.  
  7067. * BUG: Brain Boost doesn't work either!  The recovery code was messed up.
  7068.   NOW FIXED.
  7069.  
  7070. * BUG: an organge jelly just grew over my Nightmare (my nightmare is not
  7071.   being ridden) and the orange jelly just pirated his Foes Vanquished.  The
  7072.   entire list of Foes Vanquished for the Nightmare is now on the Orange
  7073.   Jelly.  NOW FIXED. see below.
  7074.  
  7075. * BUG: I uncovered the nightmare and it has no Foes Vanquished.  It doesn't
  7076.   even say "Foes Vanquished 0".  Its all one big blank spot. NOW FIXED.
  7077.   see below.
  7078.  
  7079. * REWROTE: the whole foes vanquished handling so that a creature can be
  7080.   covered then uncovered and still retain his foes vanquished
  7081.   list without it being displayed on the growth in the meantime.
  7082.   The new way seems more logical to me and it allowed the Killed() function
  7083.   to be much shorter and simpler.  Now the van_count and FoesVanquished and
  7084.   oldvan_count and oldFoesVanquished are all built right into the cell
  7085.   structure.  And the Wizard structure now has van_count and FoesVanquished
  7086.   array also.  NOW FIXED.
  7087.  
  7088. * I intentionally fixed the above two bugs and 1 part of the reason I
  7089.   rewrote the foes vanquished handling was because I was hoping that in the
  7090.   process of doing so all the other foes vanquished bugs would mysteriously
  7091.   disappear.  Well, guess what?  That is exactly what happened.  All the
  7092.   other foes vanquished bugs just mysteriously disappeared.  ALL FIXED NOW.
  7093.  
  7094. * Modified io.c to properly load and save the information.  This means the
  7095.   gamesave format has changed.
  7096.  
  7097. By turn 23 it was down to just me and 1 allied computer wizard.
  7098.  
  7099. * BUG: _Any_ time _any_ wizard kills _anything_, the kill shows up on ALL
  7100.   wizard's "Foes Vanquished".  NOW FIXED. see above.
  7101.  
  7102. BUG: at some point the audio started sounding strange.. blah blah blah.
  7103. I quit the game normally.  Later on I recompiled and when it was supposed
  7104. to say "compilation complete" the whole computer crashed and reset (no guru)
  7105. and the hard drive nearly got trashed.  It is "validating" now (has been
  7106. for several minutes).  No actual data was lost due to the fact I'm using a
  7107. real computer and not a pentium.  Be on the lookout for some sort of audio
  7108. device using/opening/closing bug.  I think maybe an audio channel doesn't
  7109. get closed sometimes. See below.
  7110.  
  7111. * BUG: When computer wizard 1 is on the top of the screen and he is trying to
  7112.   mount his steed yet is engaged, this triggers enforcer hits.  Enforcer
  7113.   hits do a DisplayBeep() which is what messes up the sound I think.  I
  7114.   know that enforcer hits make the sound effects sound funny.  I think this
  7115.   is because it changes the setting of the audio filter.
  7116.   (Enforcer Hits problem was in EngageChoice)  NOW FIXED!
  7117.  
  7118. * STUPID: A computer wizard cast demonic touch on a sleeping dragon (which
  7119.   was the only enemy creature that he could cast it on). FIXED.
  7120.  
  7121. * STUPID: Actually, after looking at the code I could see that ANY spell
  7122.   might potentially be cast on sleeping creatures.  I changed it so that
  7123.   casting any spell on a sleeping creature is considered stupid except for
  7124.   Wake. FIXED.
  7125.  
  7126. * BUG: A wizard cast Alter Reality on a pegasus being ridden by another
  7127.   wizard and the spell failed.  I have changed Alter Reality so that it can
  7128.   be cast on creatures which are being ridden by the wizard. I tested this
  7129.   and it really works! FIXED.
  7130.  
  7131. * BUG: Sometimes wizards try to cast Kill on a creature which is being
  7132.   ridden.  The assistance says FLAG_NOEXPOSEDWIZARD yet the spell is
  7133.   programmed to fail if there is a wizard anywhere in the cell.
  7134.   I changed this so that the spell now matches its computer assistance
  7135.   flags.  This means it now succeeds against mounted creatures. FIXED.
  7136.  
  7137. * FLAW: You can't easily tell when a Subversion/Betrayal/Abduction works or
  7138.   not.  It now prints "Spell Succeeds!" at the bottom of the screen
  7139.   when it succeeds. (It already said "Spell fails" when it fails.) NOW FIXED.
  7140.  
  7141. ** END playtest game **
  7142.  
  7143. * REMOVED SoundStat from the CreatureInfo structure for the following
  7144.   reasons.
  7145.   1. It doesn't belong there.  This stat will be set dynamically and will
  7146.      be different on different people's amigas.  It shoudn't even be saved
  7147.      in the savegame file.  It ABSOLUTELY should not be saved in the
  7148.      savegame file.  Well, ok I guess we could save it so long as we
  7149.      regenerate the stat each time we load the game.
  7150.   2. It was a UBYTE which isn't big enough anyway.
  7151.   3. It was stuck in the wrong place for some unknown reason so by
  7152.      eliminating it we actually save 4 bytes instead of only 1. (it was
  7153.      totally messing up the alignment.)
  7154.   4. I am going to implement SoundStat as its own array when I start adding
  7155.      the digital sound effects to the game.
  7156.  
  7157. * INTELLIGENT MAGIC WOOD CASTING implemented: Works great!
  7158.   Wizards now cast Magic Woods close to themselves and their allies while
  7159.   keeping them as far away as possible from their enemies.
  7160.   However any wizard who has " mad", "mad ", "kalsu", "crazy", "krazy" or
  7161.   "insane" in his name will use the random treecasting routine instead.
  7162.   This feature is dedicated to Joseph Dixon who said the old way of
  7163.   casting trees made the game look stupid 8)
  7164.  
  7165. Feb. 22, 1999 Mike the freak tried to start a fight with me.
  7166. Nothing accomplished Feb. 23-24.
  7167.  
  7168. * BUG: Team Scores are wrong when several people are on each team.
  7169.   Team Life is wrong when several people on each team.
  7170.   The score and life of the lowest numbered team is being displayed for
  7171.   their team and their score and life are being displayed for the OTHER
  7172.   team.  NOW FIXED. + the code is a bit more simplified.
  7173.  
  7174. * NEW FUNCTIION: AdjacentEnemies(source,cell) to return the number of
  7175.   enemies of source which are adjacent to cell.  Needed for below:
  7176.  
  7177. * INTELLIGENT DarkWood and ShadowWood Casting Implemented.
  7178.   Basically the computer wizards try to cast these trees adjacent to lots
  7179.   of enemies which are nearby.  A small consideration is given to
  7180.   enemy generators.
  7181.  
  7182. * NEW FUNCTIONS to support IntelligentCreatureCast
  7183.   int isWizardInDangerOfDying(int cell);
  7184.   int TotalCombatOfAllAdjacentEnemies(int source,int cell);
  7185.   int TotalRangedCombatOfAllAdjacentEnemies(int source,int cell);
  7186.   int SmallestAdjacentEnemyLifeToCombatRatio(int source,int cell);
  7187.  
  7188. * AVOIDED passing player numbers as parameters to all new functions.  This
  7189.   is to facilitate the elimination of all old wizards[] references by
  7190.   upgrading to Wizards[] and to help me get rid of all those p+1, p-1
  7191.   constructs.
  7192.  
  7193. * PROBLEM: Every time I am about to win the game I have a bunch of
  7194.   creatures closing in on the last enemy wizard.  It is now a bit harder to
  7195.   kill wizards since they are sometimes surrounded by trees which block
  7196.   many of my possible paths of attack and shooting.  But every time as I am
  7197.   closing in the computer wizard will cast a creature to stop me but he
  7198.   always casts it in the wrong place (like BEHIND him instead of in FRONT of
  7199.   him).  This always makes me feel sorry for the poor stupid computer
  7200.   wizards.  If only he would have cast his dragon IN FRONT of his wizard
  7201.   (between his wizard and my dragon) he could have lived for at least 1 more
  7202.   turn.  The solution is the following:
  7203.  
  7204. * INTELLIGENT CREATURE CASTING Implemented.  Works great.
  7205.  
  7206. * WOW: I just played a test game and here is what happened on turn 1:
  7207.   A computer player intelligently surrounded himself with MagicWoodTrees
  7208.   The excess trees were placed down and to the right which was very smart
  7209.   because nobody was anywhere near the bottom right corner.
  7210.   Then, the next computer player cast a Thundermare.  But instead of
  7211.   casting it next to himself he cast it 3 squares away next to the guy who
  7212.   just cast those magic trees.  The ThunderMare is now adjacent to the enemy
  7213.   wizard and 2 of his Magic Trees!  He's ruthless!  And he did this EVEN
  7214.   though there was another wizard who was closer! (but had no magic trees
  7215.   or other creatures.)
  7216.  
  7217.   Another computer wizard cast a nightmare and instead of casting it
  7218.   randomly he cast it adjacent to an enemy wizard who is now engaged to an
  7219.   undead creature!
  7220.  
  7221.   The above 2 engaged wizards were the first to die, thus proving that the
  7222.   other wizards, did, in fact, cast intelligently.
  7223.  
  7224.   Couple of turns later: Some computer guy just cast a Bolter Wall directly
  7225.   between my wizard and my Eagle!  He completely messed up my whole plan!
  7226.   Instead of just throwing it out on the board he put it where it would
  7227.   cause me a lot of problems.
  7228.  
  7229. * BUG: in new IntelligentCreatureCast: Casting a creature while in someone
  7230.   else's tree makes the creature become the tree owner's instead of the
  7231.   caster's. FIXED.
  7232.  
  7233. * All spells which start with "h"-"p" have been upgraded to JC.
  7234.  
  7235. * PROBLEM: I have killed wizards many times on the first turn with Ball
  7236.   Lightning and many other times during the game also.  In fact, lately
  7237.   I've been winning the game in only 12-18 turns.  So I have now
  7238. * REDUCED Ball Lightning's Life damage from a 10:1 ratio down to 2:1.
  7239.   
  7240.  
  7241. BUG: My wizard with 21 life just cast sanctuary and it only gave him
  7242.   2 recovery!!!  I am unable to duplicate this bug.  Perhaps someone
  7243.   whacked him with a poison dagger when I wasn't looking.  I don't know.
  7244.  
  7245. * BUG: The spellmanager just crashed my computer while processing the
  7246.   spell file for MassMorph.  I mistyped Commment: instead of Comment:
  7247.   FIXED by SAI.
  7248.  
  7249. * All spells which start with "q"-"z" have been upgraded to JC.
  7250.  
  7251. * CHANGED: Abath combat from 4 to 8 since the description says that it
  7252.   has an enlarged horn which can induce severe bruising.
  7253.  
  7254. * BUG: smake newspell does not rebuild pool.ssc.  Thus when I change a
  7255.   spell description and do smake newspell, the new description is included in
  7256.   spells.tex and spells.html but not in the game itself.
  7257.   smake clean smake dev does not rebuild pool.ssc either.  As near as I can
  7258.   tell only smake release rebuilds pool.ssc. Leaving this for SAI.
  7259. SAI: Allegedly fixed this by making smake newspell first delete pool.ssc
  7260.   so that the system will have no option but to remake it.
  7261. SAI: Well that didn't work, so now I deleted pool.txt as well.
  7262. SAI: That didn't work either, ISWYM about this problem. I think the real
  7263. difficult is that Amiga makefiles don't allow two dependencies on the left.
  7264. SAI: Oh, no wonder it isn't working there is nothing in the makefile that
  7265. causes the pool.ssc line to be invoked. Therefore I've added pool.ssc
  7266. to the top line of requirements in makechaos.
  7267. SAI: No that didn't work either. Oh, well I continued fixing this
  7268. below.
  7269. SAI: Gave up on the old makefile and rewrote it.
  7270.  
  7271. *************************************************************
  7272. ***** MAD RAMPAGE to eliminate all wizards[] references *****
  7273. *************************************************************
  7274.  
  7275. * REPLACED all 3 of the remaining wizards[] references with Wizards[] in
  7276.   predicate.c.  Rewrote various FOR NEXT loops to facilitate this.
  7277. * REPLACED both of the remaining wizards[] references with Wizards[] in
  7278.   chaos.c.
  7279. * REPLACED all 5 of the remaining wizards[] references with Wizards[] in
  7280.   bonus.c. Rewrote ChooseGUISpell() to require a REAL player number instead
  7281.   of a fake one.
  7282. * REPLACED all of the remaining wizards[] references with Wizards[] in
  7283.   spell.c.
  7284. * REPLACED all 10 of the remaining wizards[] references with Wizards[] in
  7285.   cast.c  Rewrote DoComputerCast() and PlasmaBeamHandler to require a REAL
  7286.   player number.
  7287.  
  7288. After doing all the above I played some test games and found that I had
  7289. accidentally created 2 bugs.  These were easily fixed but it shows that
  7290. extreme caution is warranted.
  7291.  
  7292. * All wizards[] references have now been successfully eliminated from
  7293.   everywhere except the spell files.
  7294.  
  7295. Create a new variable "Player" for Cast, CastFree and CastMagic.
  7296. This variable will replace "player" and "p" slowly but surely.
  7297.  
  7298. player and p are the old fake player numbers.
  7299. Player is the REAL player number.
  7300.  
  7301. So it is simply a matter of replacing all wizards[p] or wizards[player]
  7302. with Wizards[Player]
  7303.  
  7304. Eventually "player" and "p" will be obsoleted and removed.
  7305.  
  7306. Any function calls of the form Function(player) will be replaced with
  7307. Function(Player-1).  Eventually all functions will be rewritten to use REAL
  7308. player numbers so that the -1 can be removed.
  7309.  
  7310. Any function calls of the form Function(player+1) will be replaced with
  7311. Function(Player)
  7312.  
  7313. Replace wizards[player].xyz with wizardsp->xyz (which = Wizards[Player])
  7314.  
  7315. Before attempting this, the main filesize of a smake release is 358544
  7316.  
  7317. * All old wizards[] references have been REMOVED from ALL Spell files!
  7318.   YAY!!
  7319.  
  7320. * REWROTE: Drainer(), WakeUp(), HandleJoker(), ScoreAdd(),GetWizardCell(),
  7321.   CastFreeSpell(), CastMagicSpell(), Multiplicity(), 
  7322.   to use REAL player numbers instead of fake ones.
  7323.   This allowed me to eliminate ZILLIONS of "Player-1" style references.
  7324.  
  7325. * Removed "player","p" and "i" from cast.c functions.
  7326.  
  7327. * REWROTE the FOR-NEXT loops so that the "currentPlayer" global variable is
  7328.   now the REAL player number instead of the realnumber-1.
  7329.  
  7330. * REWROTE InformationPanel(), InformationPanel1(), SayName(), AddSpell(),
  7331.   AddGUISpell(), GetSpells(), WhatSpell(), QuerySpell(), SetSpell(),
  7332.   ComputerSpellDiscard(), IntelligentComputerSpellSelect(), 
  7333.   to use REAL player numbers instead of fake ones.
  7334.  
  7335. * ALL the functions in cast.c, predicate.c, predicate.h, info.c, chaos.c,
  7336.   spell.c which take a player parameter now take a REAL player parameter.
  7337.   ALL the functions in move.c and cmove.c already took REAL player numbers.
  7338.  
  7339. * Several functions in spell.c which take a real player number parameter
  7340.   still use fake player numbers internally to index into various arrays.
  7341.   I'll fix that later.
  7342.  
  7343. * Main filesize of smake release is now 357308.  Only saved 1236 bytes.
  7344.  
  7345. **************************************************************
  7346. ***** END MAD RAMPAGE ****************************************
  7347. **************************************************************
  7348.  
  7349. * STUPID: A computer wizard cast reincarnate on his ally's Bolter Wall
  7350.   which already had Reincarnate cast on it. FIXED.
  7351.  
  7352. * STUPID: A computer wizard cast Horror on a creature which already had
  7353.   Horror. FIXED.
  7354.  
  7355. * POSSIBLE BUG: A computer wizard just cast "Free" on a manticore that was
  7356.   being ridden by another wizard. The Manticore is now an independent and is
  7357.   still being ridden.
  7358.   SAI: Yep, this is a bug, the spell file need to check for this.
  7359.   SAI: NOW FIXED.
  7360.  
  7361. * BUG: Click on an eyeball.  Now try to attack an undead creature by
  7362.   accident.  Now it says you are engaged even though there are NO creatures
  7363.   next to you.  You can't move or do anything but cancel your movement.
  7364.   This was found when I tried to attack a Wizard that had Liched himself.
  7365.   Leaving this for SAI. FIXED by SAI. Details appear later.
  7366.  
  7367. ************************************************************************
  7368. *******  An Enforcer Hit Bug Related to a Vanished Computer Wizard *****
  7369. ************************************************************************
  7370.  
  7371. BUG: I vanished an enemy wizard and then at some point thereafter (perhaps
  7372. in the movement phase) numerous enforcer hits occurred.  Unfortunately I
  7373. forgot to run the game under CPR so I don't know what caused this exactly.
  7374.  
  7375. I saved the game at this point.
  7376.  
  7377. BUG: the thinking phase of the vanished wizard triggered more enforcer
  7378. hits.
  7379.  
  7380. I played the game for several more turns until I won.
  7381.  
  7382. Now I quit the game and did a run cpr chaos
  7383.  
  7384. oh great, when I try to load the saved game it doesn't work! 8(
  7385.  
  7386. I'm figuring that this is all related to bogus returns by GetWizardCell
  7387. when a wizard has been vanished.
  7388.  
  7389. Ok, I just spent half an hour looking around at files, trying to decide
  7390. what I'm going to do tomorrow.  I'm tired now.  I'm going to bed.
  7391.  
  7392. STRANGE: I woke up the next morning and whaddaya know?  The game from last
  7393. night is sitting there in cpr with a BUS/ENFORCER HIT in IsExposedWizard.
  7394. (I leave my amiga on almost all the time.)
  7395.  
  7396. So the game loaded correctly after all!  YAY!  I have no idea what caused
  7397. the huge delay.
  7398.  
  7399. This is all caused by the first few lines of IntelligentComputerSpellSelect
  7400. which derives the cell of the wizard, which for a Vanished wizard is all
  7401. completely bogus.  Leaving this for SAI.
  7402.  
  7403. SAI: I will attempt to replicate this problem if I have time. Problems like
  7404. this used to occur when warped wizards mistakenly tried to cast spells.
  7405. The only likely reason is that something has corrupted the warped bit of
  7406. the corresponding wizard entry.
  7407.  
  7408. SAI: Vanished objects should never try to select a spell in the first place.
  7409. However, the code in IntelligentComputerSpellSelect will indeed fail if it
  7410. is called erroneously like this, because their will be a dereference of the
  7411. type board[-1].
  7412.  
  7413. JC: Ok I fully understand this problem now.  Vanished wizards should never
  7414. be thinking about casting a spell because their .Warped bit will be set.
  7415. So if I ever encounter this bug again I'll know what to look for and can
  7416. hopefully fix it.  
  7417.  
  7418. ***************************************************************************
  7419. ***** End of An Enforcer Hit Bug Related to a Vanished Computer Wizard ****
  7420. ***************************************************************************
  7421.  
  7422. * IMPROVED the speech of "Player One", "Player Two" etc.
  7423.  
  7424. * STUPID: A wizard just cast combat on himself and on the next turn he cast
  7425.   Poison Dagger on himself, thus wasting his combat spell!  FIXED by raising
  7426.   the ranking of Poison Dagger by 4 points to be 1 point higher than Combat +
  7427.   modified IsStupidCast().
  7428.  
  7429. HYBSIL says it fires poisoned arrows.  So we should either:
  7430. A) Make its Ranged Combat attack recovery or
  7431. B) Change the description to say "more powerful arrows" or "deadlier
  7432.    arrows" or "stronger arrows" or something of that nature.
  7433. Which do you want to do?
  7434. SAI: Implemented option A. NOW FIXED.
  7435.  
  7436. * CHANGED: WoodElf only needs 4 kills to be promoted to a DreadElf.
  7437.  
  7438. ReleaseSemaphore(&SourceCode); by JC on March 10th, 1999.
  7439. ObtainSemaphore(&SourceCode); by SAI on 990312
  7440.  
  7441. * Siphoned off 1998 readme stuff into a separate file: readme.1998.
  7442.  
  7443. * Expanded the list of names available at the start of the game. See the
  7444.   file namer.c for details. Basically names at the start of the game
  7445.   are randomly assigned from a possible list. It would be easy to make
  7446.   this a configuration file like "TalkLines" but I have refrained from
  7447.   doing so because I don't want a massive proliferation of such files.
  7448.   Players can of course still edit the names at run time.
  7449. JC: Hmmmm... I hadn't ever really thought of the TalkLists file as a
  7450. "configuration file" that end users would manipulate.  I just made it the
  7451. way it is to be easy for me to update it.  But now that you have mentioned
  7452. it -- it really is a user configurable file like spell.prb
  7453.  
  7454.  
  7455. QUESTION: Should players be able to edit names?
  7456. JC: YES!  Absolutely.  When I play games against other humans we _always_
  7457.     edit our names.  We even edit the names of the computer wizards to have
  7458.     their player number after their name.
  7459.  
  7460. We could save memory
  7461. (by dropping all the gadgets associated with such editing) but
  7462. disallowing it. In general I am keen on options like that, but if
  7463. very few people use it perhaps it is not worth it. I for one hardly
  7464. ever alter my name. ??
  7465.  
  7466. PROPOSAL: Amalgamate various configuration files into a single file
  7467.     TalkLines
  7468.     chaos.prb
  7469.     classic.prb
  7470.     WizardNames  (not yet existing)
  7471.     Default preferences (not yet existing)
  7472. I suspect it would take about 2K to implement a full parser for such
  7473. a file. (However, these files all have separate parsing at the moment
  7474. anyway--so perhaps it would reduce memory usage--it would also
  7475. certainly improve startup speed).
  7476.  
  7477. JC: I like having seperate files for seperate things.  Its nice and logical
  7478.     that way.
  7479. JC POSSIBLE COUNTER PROPOSAL: Simply put all user-configurable files in their
  7480.    own directory. Config/   Then if a user wants to configure something there
  7481.    will be some files there each clearly named as to its purpose.
  7482.    Of course it is entirely possible to play the game for years and never
  7483.    need or want to edit the probability files.  I've only done it once
  7484.    myself.  My real life friends who play the game have _never_ edited the
  7485.    probability files.
  7486.  
  7487.    The problem with this idea is that a config directory is more noticeable
  7488.    and people will be more likely to go in and change things around.
  7489.    Whereas now, most people don't even think about it and they leave
  7490.    everything the way it is.
  7491.  
  7492. JC: Bottom Line: I'm perfectly happy with things the way they are.  People
  7493.    don't really need to know that TalkLists.txt is editable by them.  If
  7494.    they figure out they can add their own stuff in then let them.  It'll be
  7495.    there for the power users.
  7496.  
  7497.  
  7498. PROPOSAL: Drop the menu section of creatures from the editor (the
  7499. pull down menus that is, not the graphical method!) This menu
  7500. system is really rather redundant given the graphical method and
  7501. is harder to maintain automatically when new spells are added.
  7502. Finally it has no support at all for non creature spells.
  7503. JC: I concur 100%
  7504.  
  7505.  
  7506. PROPOSAL: Given that we are tentatively going outside the std A500,
  7507. I recommend using #ifdef BIG to surround code to appear only in the 
  7508. advanced version. This would be preferrable to having to maintain the
  7509. old version separately. I can see there are still a few potential
  7510. problems, in particular with dealing with the spell files via
  7511. Spell Manager etc. I will have to add a new tag similar to Classic
  7512. indicating whether a given spell should only be present in the BIG
  7513. version of the game.
  7514. JC: If you want to try this you can, but it will be entirely your
  7515.     responsibility 8).   Once I finish the 1 meg version I intend to never
  7516.     look back.  All the current gaming consoles like PlayStation have at
  7517.     least 2 megs of ram.  The newest game console, the Sega Dreamcast has
  7518.     26 MEGS of ram!  Most of the people I know who still use A500s have at
  7519.     least 5 megs of ram on their system.  But the real kicker is that once
  7520.     I implement the graphics upgrade I don't think you can possibly do any
  7521.     #ifdefs to make it run.  The graphics are simply going to take more
  7522.     than 1 meg, in fact they will quickly be approaching the 2 meg limit.
  7523.     HINT TO ALL 1 MEG AMIGA OWNERS: For god's sake, buy some more memory!
  7524.  
  7525. * Removed traces of TeX from defines.h
  7526.  
  7527. * Completely went through spell.c making modifications to
  7528.     A: Eliminate spell selection gadgets.
  7529.     B: Make it so we use standard player numbers.
  7530.     C: Remove TeX/fix comments
  7531.     D: To do a general audit on the code.
  7532.  
  7533. * Okay I finished all the changes for Phase 1 of the spell selection
  7534.   upgrade and went to move them to my Amiga via a PC disk. Immediately
  7535.   I had a problem. DOS as usual truncated my Linux/AmigaDOS files names
  7536.   to 8 letters so that MakeDemoOfChaos became MakeDe~1. Now I knew this
  7537.   would happen and my Amiga had no problem copying them off the PC disk
  7538.   onto my harddrive. But then the problems began. The brain dead AmigaDOS
  7539.   rename command just would not rename the files to something sensible.
  7540.   I tried all sorts of ways of doing it. Copy didn't work either, it
  7541.   just insisted on making a new directory every time. In the end I had
  7542.   to delete them (at least it let me do that) and copy them again from
  7543.   Linux with shorter names. Another 10 minutes wasted. OK, DOS is real
  7544.   lame for having such a stupid filename limitation, but AmigaDOS is
  7545.   just as daft for letting you create files that you can't rename or
  7546.   copy! I never have these problems with Linux. Well if my Amiga wasn't
  7547.   so old and slow then I suppose I would be more keen to use it.
  7548.   JC: the ~ symbol is used by AmigaDOS to mean "not" in pattern matching.
  7549.       so that you can things like:
  7550.   LIST ~(#?.txt) to list all files that do not end in .txt.
  7551.   | is used to mean "or" btw.  Anyway, I guess this causes a bug in the
  7552.   copy and rename commands when dealing with files with ~ in them. 8(
  7553.   
  7554.   Hint to SAI: Buy a faster Amiga! 8)  I have a lot of Amiga friends on the
  7555.   net with 50 Mhz 060s.  That's about 10x faster than our 25Mhz 030s.
  7556.   And I haven't even mentioned the ones with 200Mhz PPC Amigas.
  7557.  
  7558.  
  7559. * Anyway back to the important stuff. The SpellTable now works with
  7560.   real player numbers. There are new functions in spell.c to deal with
  7561.   displaying spells for selection using simple mouse events rather than
  7562.   gadgets. HandleIDCMP in chaos.c has been modified accordingly.
  7563.  
  7564. POTENTIAL BUG: Looking at HandleIDCMP I don't see what is stopping the
  7565.   program from doing an InformationPanel request on invalid information
  7566.   when the player clicks outside of the normal board. I will test this
  7567.   as soon as I can get the game to compile again. NO, I JUST OVERLOOKED
  7568.   ONE IF STATEMENT. The call is safe. NOT A BUG. IGNORE THIS PARAGRAPH
  7569.  
  7570. * As a result of my changes the file "gadget.c" is now obsolete and
  7571.   has been deleted.
  7572.  
  7573. * Well it seems some of my changes don't want to compile. So I think it
  7574.   is time I go to bed and sort out the problem when I am fresh in the
  7575.   morning. In particular my clever &HST[-1] assignment failed because
  7576.   it can be done at compile time, although I don't understand why
  7577.   given that both objects are static. Anyway I'm sure I will be able
  7578.   to fix that in the morning.
  7579.  
  7580. SATURDAY 990313
  7581.  
  7582. * I got my changes to compile now. My new names didn't work at all, the wizards
  7583.   just showed up without names. The spells were not quite drawn at the
  7584.   correct position and worse the same spell was repeated for the entire
  7585.   screen. Finally the spell selection didn't work at all.
  7586.  
  7587.   Okay it is now displaying the spells okay but the selection is not working.
  7588.   Damn, I've just been called into work when I thought I would have the whole
  7589.   day for Chaos. At least I managed to put them off until the afternoon. I
  7590.   should have used my modem so they couldn't call me! Now my Amiga appears to
  7591.   have locked up during compilation (I'm writing this on my Linux box). I'll
  7592.   give it a couple more minutes. REBOOT. Okay compilation successful again.
  7593.  
  7594. * Phase 1 of the spell selection upgrade is now completed. The spell gadgets
  7595.   are gone.
  7596.  
  7597. * I've run into trouble trying to manipulate the HST[][MAX_SPELLS] structure.
  7598.   I can't get the compiler to give me a pointer one entry logically earlier
  7599.   than memory than the first. I want HST[-1]. Normally this sort of thing
  7600.   works exactly as you would expect, but in this case the compiler just gives
  7601.   modifiable lvalue complaints, but I don't know how else to declare the
  7602.   pointer I wish to assign to. The weird thing is that when I use #define
  7603.   (&HST[-1]) for the same purpose it works without problems. I'm sure that
  7604.   short *SpellTable[MAX_SPELLS] ought to give me a 4-byte quantity which is a
  7605.   pointer to a array of MAX_SPELLS short, and maybe it is but the compiler then
  7606.   will not let me do SpellTable = HST[-1].
  7607.  
  7608.   Finally got it sussed the relevant line is (from spell.c):
  7609.     static short (*SpellTable)[MAX_SPELLS] = &HST[-1];
  7610.   getting the parentheses in there was the key.
  7611.  
  7612. * Moved the Dismount gadget up next the query gadget.
  7613.  
  7614. * Implemented Phase II of the spell selection upgrade. The spell the mouse is
  7615.   over is now reported at the bottom of screen. The works harmoniously with
  7616.   normal cell reporting. The relevant changes are in HandleMOUSEMOVE.
  7617.  
  7618. * I decreased the delay for messages to stay on the screen during computer
  7619.   spell selection. It still seems too long so I will shorten it more yet.
  7620.   I think it adds to the atmosphere if you have to read quickly, helps
  7621.   gives the impression of action.
  7622.  
  7623. * I've just noticed that computer players no longer use their spells up
  7624.   (i.e. they are just getting the same spell over and over again). However,
  7625.   I know why this is happening and it will be easy to fix. NOW FIXED
  7626.  
  7627. * Blanked the bottom area of the screen after spell selection.
  7628.  
  7629. * Fixed a problem with discarding. Now marks a spell used when it is first
  7630.   selected so that the player canNOT discard the same spell (this was done
  7631.   in a completely different way under the gadget scheme).
  7632.  
  7633. * Changed printing routines in text.c to const char* to better reflect
  7634.   their true nature and suppress some compiler warnings (i.e. compiler
  7635.   will silently promote char * -> const char *, but complain bitterly
  7636.   going the other way). Didn't do this to WriteNearBottom since it
  7637.   does not treat its argument as constant.
  7638.  
  7639. * Eliminated all warnings in the compilation of chaos.c
  7640.  
  7641. * Discovered that it was still printing the last spell list lines at the
  7642.   bottom of the screen even when they weren't actually displayed on the
  7643.   right of screen. Modified HandleIDCMP so it no longer does this.
  7644.  
  7645. * Modified GetSpellSelection to blank the lower lines after each player
  7646.   has selected a spell.
  7647.  
  7648. * Reduced the delay on the text messages even further. There is now a
  7649.   constant BASE_DELAY in defines.h which controls this.
  7650.  
  7651. * When spell selection occurs now a blank square is drawn over the
  7652.   selected spell. This helps make things clearer especially when using
  7653.   the Texas mode.
  7654.   JC: Cool. Good idea.
  7655.  
  7656. * I just discovered that the MagicCastle spell is functioning as a non
  7657.   spell. Clicking on it is just ignored, it doesn't get used, and you
  7658.   don't get a chance to use it. This was because MagicCastleID must be
  7659.   the same as the gadget code for EndID. I modified the way HandleIDCMP
  7660.   returns the EndID in the case of a spell return to fix the problem. I
  7661.   was lucky this happened on such a common spell or this problem might
  7662.   have gone unnoticed for some time. NOW FIXED
  7663.  
  7664. * Removed all the no longer necessary references to spellGadgets.
  7665.   This ends the spell selection upgrade.
  7666.  
  7667. WARPING PROBLEMS:
  7668.  
  7669. * Hmm. GetWizardCell did seem to have some shortcomings. It now checks
  7670.   if a wizard is alive and not warped before trying to calculate a cell.
  7671.   In the case of a dead or warped wizard it returns -1. This will of
  7672.   course never match a real cell on the board. Previously, a dead wizard
  7673.   would have been reported at is position of death(?) and a warped wizard
  7674.   would have returned -(GAMECOL + 1). But this was then cast to an UWORD
  7675.   so it would have been some big positive number. I'm not sure why this
  7676.   should have caused problems tho'.
  7677.  
  7678. * The three ways things can get warped out are Hide, Vanish, and via a
  7679.   vortex. All three of these use the WarpOut function and so there should
  7680.   not be any problem there.
  7681.  
  7682. * NEW POWERUP: An orc, goblin, or troll killing an elf, will now pick up the
  7683.   bow previously used by the elf.
  7684.  
  7685. * I just saw the problem where a computer wizard cast sleep on a mounted
  7686.   creature. There were no other suitable targets nearby, but it still
  7687.   doesn't explain why that spell was selected in the first place.
  7688.   NOW FIXED
  7689.  
  7690. * Improved the editor so that cutting and pasting a wizard, will cause the
  7691.   game to correctly register the wizard's position. It will also make the
  7692.   wizard alive and not warped. I haven't tested this very well yet, put
  7693.   multiple copies of a wizard at your own risk.
  7694.   JC: ah... yes I see what you mean.  Maybe we should have a different
  7695.       method for positioning wizards?  We just need some way to control the
  7696.       starting positions of wizards for certain predefined levels.
  7697.  
  7698. * I also noted the Docs contain nothing about how to use the editor.
  7699.  
  7700. MAKEFILE PROBLEMS: I've been trying to correct the pool.ssc problem for the
  7701. last hour now.
  7702.  
  7703. * While trying to fix the problem re makefile/pool.ssc, I added a new
  7704.   creature "Ogre Warrior" to test it.
  7705.  
  7706.   I've tried several times. I finally got it to automatically recreate
  7707.   pool.ssc, but it was still incorrect because it did not include the
  7708.   description for the new spell, thus if threw most of the other spells
  7709.   off by one position.
  7710.  
  7711.   This arose because info.c was recompiled before the new index.h file
  7712.   (dependent on pool.txt) was generated. I've now changed things around
  7713.   so that "smake newspell" deletes info.o and info.o depends on pool.ssc
  7714.   which in turn depends on pool.txt. I think this should be sufficient.
  7715.  
  7716. * Fixed a bug in image.c that was placing extra carriage returns in output.
  7717.  
  7718. * Fixed the editor so that the spell list is redisplayed when the editor
  7719.   exits.
  7720.  
  7721. * Attempted to fix the problem where the bonus spell selection panel is
  7722.   sometimes made bigger than it should be.
  7723.  
  7724. * Fixed a bug pertaining to computer wizard spell selection that was
  7725.   resulting from my earlier changes to spell selection.
  7726.  
  7727. * Discovered that I still haven't succeeding in fixing the make newspell
  7728.   problem. Now it is not rebuilding chaos.dat correctly!
  7729.  
  7730. * Decided that the current system of a lmkfile and makechaos really
  7731.   sucks, so I rewrote the makefile and it is now just called "Makefile".
  7732.   (I renamed lmkfile to stinkfile). The new file seems to work much better
  7733.   but obviously I need to test it a fair bit more yet.
  7734.  
  7735. ELIMINATION OF MOUNTED BIT
  7736.  
  7737. * Eliminated all occurrences of the MOUNTED bit from the code. Unfortuantely,
  7738.   I haven't changed all the documentation to reflect this change. Anyway from
  7739.   now on all testing for wizards should be done with GetWizardCode(cell).
  7740.  
  7741. PROMOTIONS UPGRADE
  7742.  
  7743. * I added a routine to do sensible promotions on a cell. Several stats now
  7744.   take the max of the original and the new creature. Not all of them, so there
  7745.   is still some additional challenges for those deliberately going for power
  7746.   ups.
  7747.  
  7748. * Then I decided that the code in "move.c" for actually testing for powerups
  7749.   was rather silly, so I rewrote it to use a table rather than a whole pile
  7750.   of IF statements.
  7751.  
  7752. * Then I realized that the table should be generated from the spell files
  7753.   rather than maintained separately. Therefore, I added tag recognition
  7754.   for "Promotion" and "ProCount" to the Spell Manager. So now when you want
  7755.   a creature to get promoted you need only put entries in the corresponding
  7756.   spell file (see woodelf.spl and ogre.spl for examples). At present the
  7757.   such powerups can only be specified if they occur once a certain number
  7758.   of kills have been achieved.
  7759.  
  7760. * None of this change does not affects Horse->Thundermare->Iridium or
  7761.   other powerups that don't just involve bonuses for multiple kills.
  7762.  
  7763. * At present the power ups using the new system are:
  7764.     WoodElf -> DreadElf (4 kills)
  7765.     Ogre -> Ogre Warrior (5 kills)
  7766.     Ogre Mage -> Ogre Assassin (7 kills)
  7767.     Green Dragon -> Emerald Dragon (7 kills)
  7768.  
  7769. * Eliminated a warning in the compilation of move.c
  7770.  
  7771. SLEEPING/SUBVERSION on WIZARD BUG SOLVED
  7772.  
  7773. * I finally tracked down the problem whereby computer wizards having been
  7774.   casting sleep etc. on mounted wizards when the code looks like it
  7775.   explicitly rules it out. The problem was that "flags" was declared as a
  7776.   UBYTE in isStupidCast and DoComputerCast when in should have been
  7777.   USHORT. I wish the type checking on the compiler was a little more
  7778.   stringent sometimes. Anyway I believe this change has erradicated the
  7779.   observed bugs.
  7780.  
  7781. * Made the fade twice as fast in Disection spell.
  7782.  
  7783. * Changed that Magic Shield spell, so that casting a shield on a creature
  7784.   with maximum MR causes its MR_Recover rate to increase by one. Hence
  7785.   by casting lots of shields you can make something *very* magic resistant.
  7786.   Changed Protection to work the same way.
  7787.  
  7788. * Eliminated a warning in the compilation of cast.c
  7789. * Fixed the bug in the Free spell.
  7790.  
  7791. * CHANGED BoardEffect so that when the effect is for the entire screen
  7792.   no sound is produced (I found things like "cure" were getting real
  7793.   annoying because they take several seconds to complete). [Note I am
  7794.   talking here about the GREENCIRCLEEX effect in cell.c]
  7795.  
  7796. META-COMMENT: I've been quite pleased with how much progress I've made in
  7797. the little time I've had to work on things. It has been really helpful
  7798. having JC's list of bugs with clear things requiring my attention. I note
  7799. there are still a fair few bugs on the list to go, so I best get on with it!
  7800.  
  7801. * FIXED the bug that was preventing movement after accidently making an
  7802.   invalid attack. I'm sure this bug must have been introduced as the 
  7803.   result of one of our rationalizations. Anyway it is all fixed now.
  7804.  
  7805. * CHANGED: Hybsil when shooting now affect Man and Recover stats making it
  7806.   more consistent with poison as the description says.
  7807.  
  7808. * Made move.c depend on initial_data.c in the Makefile (i.e. depends on
  7809.   spell information). This is needed because of the promotion.c file which
  7810.   move.c now includes.
  7811.  
  7812. SPELL.C again. I just went over spell.c with my FTC (fine toothed comb) to
  7813. try and make it more efficient and save sapce.
  7814.  
  7815. * Removed 1 off counters for SpellRank array.
  7816. * Removed AddGUISpell as it was the same as AddSpecificSpell
  7817. * Made spell.c more likely to compile under Unix (except DrawImage call).
  7818. * Fixed potential bugs in board[-1] references
  7819. * Replaced various majic numbers with constants.
  7820. * Made use of Spells variable more logical.
  7821. * If io.c didn't use Spells then Spells could be made static.
  7822. * Most places using SpellTable[Player] in a loop have been simplified.
  7823. * The order of certain conditionals in computer spell selection has been
  7824.   changed for speed. Most conditions like if ((a or b) and c) are much
  7825.   better written if (c and (a or b)) because of short-circuiting eval
  7826.   of these expression, but great care must be taken in general because
  7827.   of implicit assumptions about ordering.
  7828. * Updated documentation in spell.c
  7829. * SpellProbability and DisplayedSpells are now static.
  7830. * Some trivial functions are now __inline (perhaps some of the simplest
  7831.   cases in predicate.c could benefit from this as well).
  7832. * MAX_SPELLS has moved from defines.h -> spell.h.
  7833. * Fixed a few type anomalies.
  7834. * These changes saved 1128 bytes in the developer version.
  7835.  
  7836. ENFORCER HIT: There was an inforcer hit on line 27 of text.c corresponding
  7837. to a call to Text (probably with an invalid char * pointer). Since this
  7838. occurred when I was experimenting with spell.c and it has not repeated I'm
  7839. ignoring it. NOW FIXED
  7840.  
  7841. MAKEFILE TESTING: I am now make an archive and doing a make from it to
  7842. test the new makefile. Okay, I had to make two minor changes, but basically
  7843. it worked. I've just noticed that my new makefile does not include options
  7844. for making anything other than "developer" version at present. I will do
  7845. this simply by including various option lines. Therefore to make a version
  7846. you will have to select the correct option lines from the top of the file.
  7847.  
  7848. * Improved make clean to delete .h and .c files which are automatically
  7849.   created.
  7850.  
  7851. * Changed the makefile to include options for the 68000 no editor release.
  7852. * Changed the makefile to include options for the 68020 release.
  7853. * Changed the makefile to incoude options for the demo versions.
  7854.  
  7855. NOTED: During compilation of release and demo versions there are many more
  7856. compiler warnings about unused variables. I can see two reasons for this:
  7857. First some are due to the optimizer (not a lot we can do about those), but
  7858. a few are due to #ifdef's not be present around some declarations where
  7859. they should be. There are also some warning about possible unitialized use
  7860. of variables, these ought to be checked more carefully as they are potential
  7861. bugs (if such usage ever actually happened).
  7862.  
  7863. IO BROKEN. Discovered that loading and saving is broken as a result of my
  7864. changes regarding wizards names. NOW FIXED.
  7865.  
  7866. Discovered that my changes to spell.c have caused some anomalies, in one
  7867. function I was returning a spell probability rather than a spell! Since
  7868. this code was replicated in 3 places in spell.c I implemented a new function
  7869. GetSpellFromProbability to make sure they are all homogeneous, now if there
  7870. is any problem with silly spells be granted there is only one place where
  7871. the code is likely to be wrong. This particular problem was the cause of
  7872. the enforcer hit noted above.
  7873.  
  7874. I had invertently damaged the Texas option, it now was trying to force you
  7875. to discard even when you have no spell left. FIXED.
  7876.  
  7877. BUG: I've noticed that when agent casting is turned on they will still
  7878. cast bad spells on their team mates when no other targets are available.
  7879.  
  7880. COMPLETED: I finished the implementation of the Passage spell. It is no
  7881. longer a wizard power-up but a single invocation. The code is rather like
  7882. that for PlasmaBeamHandler. This Wizard structure no longer has a "passage"
  7883. bit, changed all references to it accordingly. Note this will break io.c
  7884. even further, but I intend to fix that problem next. All spells in the game
  7885. are now up to date, the only object not yet functioning sensibly is the
  7886. "exit". In the mean time it behaves like a normal inanimate, so I'm just
  7887. leaving it like that for now.
  7888.  
  7889. IO REPAIRS: It turns out the problem with loading and saving games had
  7890. nothing to do with my name changes, but that the loading routine was broken
  7891. when presented with a name containing whitespace. The culprit has been
  7892. modified. Old files should still load (including some that would not before).
  7893. However, due to changes in the Wizard tags some wizard powerups will not be
  7894. encoded exactly the same, I don't expect this to create any problems,
  7895.  
  7896. DELETED Makechaos, stinkfile (was lmkfile), and MakeDemoOfChaos, they are
  7897. now all redundant.
  7898.  
  7899. CONSISTENCY IMPROVEMENT: When you select sound off from the game menu it now
  7900. turns off sound for the independents during both movement and casting. This
  7901. makes playing against 99 generators run considerable faster.
  7902.  
  7903. PASSAGE: Improved the comment on the Passage spell to reflect that fact
  7904. that a mounted creature or mediation can also make passage.
  7905.  
  7906. BUG: Wizards were not clearing wizards[].spell after using a spell. This
  7907. meant a wizard kept repearing the last spell selected when "coercion" was
  7908. in effect. While this was quite neat when it happened, it is not what is
  7909. meant to happen with coerced wizards. NOW FIXED.
  7910.  
  7911. BUG: Computer wizards (when either exposed or mounted) often choose not to
  7912. move. No problem with that. Except sometimes they are adjacent to enemies
  7913. cells and they still don't move. In such circumstances it would be logical
  7914. to at least make an attack OR an attempt to move away.
  7915.  
  7916. DELETED creature selection menus from editor and replaced them with a player
  7917. selection menu. Each player also has a hot key RA-1, RA-2, etc. so we have
  7918. the best of both worlds.
  7919.  
  7920. Did a "smake archive" and rebuild from the archive with no errors. Good.
  7921.  
  7922. Fixed another bug perhaps causing problems with warped wizards.
  7923.  
  7924. OUT OF TIME. Well I'm off to Australia on Saturday morning, so I am going to
  7925. send you the archive now, so I have 1 day to check you received it.
  7926.  
  7927. This is the current status:
  7928.  
  7929. * I addressed all bugs except those about IDCMP.
  7930. * I have still not throughly examined the situation with warped wizards.
  7931. * There may be new bugs in spell.c due to the extensive changes I made there.
  7932.  
  7933. ReleaseSemaphore(&SourceCode) 8-April-1999 by SAI
  7934. ObtainSemaphore (&SourceCode) 8-April-1999 by JC
  7935.  
  7936. * BUG: Place the mouse pointer over a cell or spell on the edge of the board.
  7937.   Now move the mousepointer to off the board and back.  The display is now
  7938.   blank (it doesn't say what you are pointing at).  You must first move to
  7939.   ANOTHER cell and then back.  This bug has been around for a long long time
  7940.   on the board and now it is there in the spell list also.  NOW FIXED.
  7941.  
  7942. * BUG: I am playing a game as player 2. When I put the mousepointer 1 pixel
  7943.   below the bottom left spell it says "Crocodile".  When I put it 1 pixel
  7944.   under the bottom right spell it says "Repulsion".  Even though there are no
  7945.   Crocodiles or Repulsions on the board, nor are those the next 2 spells in
  7946.   my spell list.  Oops I clicked the mouse button and now I've selected
  7947.   "Repulsion" as my spell!  Now I discarded the imaginary Crocodile.  Ok it
  7948.   really let me cast the Repulsion.  NEXT TURN: The bug is now gone. 
  7949.   NOW FIXED by tossing a -1 into the math equation.
  7950.  
  7951. * ADDED some new wizard names.
  7952.  
  7953. * BUG: Ok I'm playing a test game.  On turn 1 I vanished Player 8.  During
  7954.   the next spell selection I got that exact same enforcer hit in
  7955.   Chaos.c/GetSpellSelection/IntelligentComputerSpellSelect/IsExposedWizard
  7956.   that I reported before.  Now that I realize this is a problem with not
  7957.   checking the .warped bit all is NOW FIXED.
  7958.  
  7959. * FIXED the warped problem in sqDistanceFromNearestTeamWizard and
  7960.   sqDistanceFromNearestEnemyWizard now that GetWizardCell(p) returns -1 for
  7961.   a warped wizard.  Though maybe I should be checking the .warped bit
  7962.   instead.  I just don't know which method will be easiest to maintain.
  7963.  
  7964. BUG in the sasc "diff" command.  It can't handle files with extremely long
  7965. lines.  Numerous enforcer hits are generated and then the computer crashes.
  7966. Found by attempting to diff single.c with the previous version.
  7967.  
  7968. What is the purpose of all those CONST keywords that you added into text.c?
  7969.  
  7970. * EDITED descriptions of OgreWarrior, Ogre Assassin and Ogre Mage.
  7971.   Since the Ogre Mage description says he is trained in the medical arts I
  7972.   gave him special combat of -1 against life.
  7973.  
  7974. * Changed Texas Trade'em into Texas Trash'em since you don't trade spells
  7975.   in, you trash them (discard them).
  7976.  
  7977. * PROBLEM: when you cast a spell it tells you the range, which isn't very
  7978.   useful.  I would much rather know the multiplicity so I know how many
  7979.   attempts I get with the spell.  I've been wanting this feature since the
  7980.   first time I played the game years ago; I could never remember how many
  7981.   attempts of Justice, Dark Power and the various tree spells I was going to
  7982.   get. This made it difficult to plan where to cast my trees.  NOW FIXED.
  7983.  
  7984. * SHORTCOMING: Q key does not work on the spell list.  NOW FIXED.
  7985.  
  7986. * BUG: At the beginning of a person's movement phase there is text left over
  7987.   from the previous person's movement. NOW FIXED.
  7988.  
  7989. * 2 NEW SPELLS:  Magic Wand and Vodka.  Neither have a real graphic yet.  I
  7990.   won't make any graphics till I implement the graphics upgrade.  I just had
  7991.   to program these in real quick while I still remembered where to put the
  7992.   code fragments that make them work.
  7993.  
  7994. Hint to myself: If you add new stuff to the wizard structure then you must
  7995. do a smake clean or there will be all kinds of horrible, strange and even
  7996. humorous bugs (like computer wizards suddenly becoming human wizards,
  7997. humans getting to pick computer wizard's bonus spells for them, and dead
  7998. wizards that still cast spells).  Found this all out the hard way.
  7999.  
  8000. ************************************* TEST GAME ************************
  8001.  
  8002. I'm playing a test game as player 2 against all the computer controlled
  8003. wizards.
  8004. Turn 1: Player 1 casts Plasma Beam on nobody.  Moves away from his enemies.
  8005. Turn 2: Player 1 casts Plasma Beam on nobody.  Moves away from his enemies.
  8006. (he is now on the edge of the screen).
  8007. Turn 3: Player 1 casts Plasma Beam on nobody.  I guess he is attempting to
  8008. move off of the board because now there are zillions of enforcer hits then
  8009. the game locked up.
  8010.  
  8011. All the other wizards and creatures acted normal.
  8012.  
  8013. The enforcer hits didn't put cpr on a line of code.  It just put it on some
  8014. assembly code, presumably because the hit happened in an OS routine.  So I
  8015. have NO idea what was causing all this. 8(
  8016.  
  8017. NEXT TIME I PLAY A GAME SAVE IT EVERY TURN!
  8018.  
  8019. All this was caused by an uninitialized variable. When I added the Vodka
  8020. spell I made a new variable "wavy". I had:
  8021.  
  8022. UBYTE wavy; instead of the correct UBYTE wavy=0;
  8023.  
  8024. So the wavytask was being stopped even though it wasn't running.  This
  8025. resulted in memory being freed which hadn't ever been allocated in the
  8026. first place.  A really good way to crash the computer.
  8027.  
  8028. It was all just a simple little mistake. ALL FIXED NOW.
  8029. **************************************************************************
  8030.  
  8031. * BUG: Computer players keep casting Demonic touch and then aborting it even
  8032.   though there are low-combat creatures nearby! NOW FIXED.
  8033.  
  8034. * REDUCED Thundermare combat to 12.
  8035.  
  8036. * BUG: I just killed a wizard and for my bonus spell I picked the Crimson
  8037.   Death. It says its probability is 226% instead of -8% like it is supposed
  8038.   to.  NOW FIXED.
  8039.  
  8040. * BUG: the "q" key no longer works on the alt-o spell list like it used to.
  8041.   I found this by pressing alt-o in the editor.  Then I clicked on the Ghost
  8042.   which showed me a list of all undead flying creatures.  I wanted to read
  8043.   the description of the Crimson Death but the Q key did not work. 8(
  8044.   Fixed by SAI. NOW FIXED.  But OOPS I actually wanted to see the stats of
  8045.   the creature, not read its spell-description.  Maybe we should have "q" and
  8046.   "Q" in the editor?  ???
  8047.  
  8048. * BUG: the 2nd tier of alt-o objects does not erase the first tier like it is
  8049.   supposed to.  Fixed by SAI.
  8050.  
  8051.  
  8052. **** Another Playtest game *****
  8053. Somehow there is a sleeping lion that is being ridden by a computer wizard.
  8054. The lion just moved.  Then it cast a Griffon. I don't know how that happened.
  8055. The mounted wizard has Irvine's invulnerability.  Couple of turns later:
  8056. now the lion has died and there is an empty cell that says
  8057. Nothing (Torquemada) has 31 life, 7 recovery, 4 MR, 15 Man, 15 Intelligence
  8058. and 1 combat. It says that all its original stats were 0.
  8059. It has the following wizard powerups:
  8060. Invulnerability, Recover Boost, Elf Boots, Brain Boost, Armor.
  8061. I don't know what caused this and I don't know how to fix it.
  8062. ********************************
  8063.  
  8064. * BUG: A sleeping Vortex is moving around the board!  NOW FIXED.
  8065. * Vortex description no longer says it leaves a trail of distorted space in
  8066.   its wake.
  8067.  
  8068. **** JCformat Rules! ***********
  8069. I had a mysterious error from the C compiler like this:
  8070.  
  8071. void HandleMOUSEMOVE(int mx, int my, int sp)
  8072. chaos.c 2380 Error 218: declaration found in statement block
  8073.  
  8074. I looked at the code prior to this line and couldn't see the problem.
  8075. I was even looking directly at the area of code where the problem was but
  8076. didn't see it for whatever reason.  Then I used JCformat on chaos.c
  8077. and it told me: Error in line 2235: Ending does not match beginning.  Thus
  8078. I fixed the problem within 5 seconds of running JCformat when in the olden
  8079. days before JCformat I'd have gotten frustrated and just went off and
  8080. watched some tv to take a break and would have lost hours of productivity.
  8081. *********************************
  8082.  
  8083. * NEW FEATURE: The "c" key now works on your spell list!  I've been wanting
  8084.   this feature for years.  Now that I've got it, it is totally cool!  You
  8085.   can _instantly_ determine all the potential targets of any spell in your
  8086.   list.  This is so much easier than having to read the 2nd info screen of
  8087.   a spell to see if it is allowed to be cast on certain types of things (like
  8088.   growths or inanimates or corpses) etc. etc.
  8089.  
  8090. * UPDATED THE DOCS for "c" key and multiplicity.
  8091.  
  8092. Monday, April 12th, 1999: New phone line installed.  I now have reliable
  8093. 24 hour access to the net.  If the Chaos internet upgrade was completed
  8094. today I could immediately start running a full-time internet game server.
  8095.  
  8096. **************************************************************************
  8097.                     ALGORYTHMIC SPEECH UPGRADE
  8098. **************************************************************************
  8099. * BUGS: The speech for Lich Lord and ShapeChanger doesn't work due to a
  8100.   typographical error in the phonetic spelling.  All these years I thought
  8101.   you had intentionally left out speech for the ShapeChanger.  Oh well,
  8102.   its NOW FIXED.
  8103.  
  8104. * FIXED the awful pronunciation of "Justice", "Castle", "Confidence",
  8105.   "Coercion", Ogre", "Ogre Mage", Ogre Assassin", "Ogre Warrior" and
  8106.   "Falcon".  Justice had been pronounced "Justayce" for years and "Falcon"
  8107.   had been pronounced "Foilcon" for years. NOW FIXED.
  8108.  
  8109. * PROBLEM: the spell manager issues warnings when I put a period at the end
  8110.   of a phonetic string.  There should not be a warning for this. Erroneous
  8111.   warnings are also issued for the chars: ,()?   NOW FIXED.
  8112.  
  8113. * IMPROVED PRONUNCIATION of ALL SPELLS.  I should have done this years ago,
  8114.   its so easy.  And I only intend to use the algorythmic speech for a few
  8115.   more months before I replace it with digitized speech.  Oh well.  There
  8116.   were just sooo many spells which were using 1 or more wrong phonemes.
  8117.   Certain spells had the correct phonemes but had the stress reversed
  8118.   (stress on 2nd syllable when it was supposed to be on the first or vice
  8119.   versa.)
  8120.   Almost every single spell file has changed now. COMPLETED.
  8121.  
  8122. Certain words like Agathion, Achiyalabopa, Abath, Amphisbaena, Bodak,
  8123. Hybsil, etc. are not
  8124. in my dictionary and I have never heard them spoken by a human being before
  8125. so I really have no idea how they are supposed to be pronounced.  I'm just
  8126. leaving mysterious words like this unchanged.
  8127.  
  8128. Apparently people in New Zealand don't pronounce the letter "r".
  8129. I found many words, e.g. "Wizard" which simply had no "r" phoneme in them
  8130. like as if you had intentionally removed it.  Since we americans pronounce
  8131. our "r"'s I have changed this.  Example: "WIH4ZAXD" is now "WIH4ZERD".
  8132. Similar for "Vampire" and "Vulture".
  8133. If you don't like this we'll have to have an option for "American Speech"
  8134. and "New Zealand" speech.
  8135.  
  8136. Some spells like Aviary didn't even have speech.  Now they do.
  8137.  
  8138. I didn't change the speech for Goblin Bomb and Hidden Horror so that people
  8139. can sneakily cast them without their opponents noticing. hehehe.
  8140.  
  8141. **************************************************************************
  8142.  
  8143. * PROBLEM: We were playing a multiplayer game.  At some point while most of
  8144.   us were out of the room somebody moved some stuff around on the table by
  8145.   the keyboard.  This resulted in a joystick falling onto the keyboard and
  8146.   resting on the return key.  This made everyone end their turn at about 1
  8147.   second intervals.  I know this isn't much of a _real_ problem but still...
  8148.   I have now implemented End of Turn Confirmation. NOW FIXED.
  8149.  
  8150. * End of Turn Confirmation addresses Joseph Dixon's complaint about the
  8151.   end-of-turn gadget being at the bottom of the screen and JJ's complaint
  8152.   about it being at the top of the screen.  It no longer makes any
  8153.   difference where it is since if you accidentally press it it will still
  8154.   bring up the requester and ask if you are sure you want to end your turn.
  8155.  
  8156. ******** CastInfo + Spells Upgrade **************************************
  8157. NOTE to SAI: In my opinion there should be CAST_NOWIZARDCELL and
  8158. CAST_NOEXPOSEDWIZARD flags for IsIllegalCast to test.  This would allow us
  8159. to simplify the hints of certain spells since hints are not needed to
  8160. prevent something that is illegal in the first place.  The reason I want
  8161. this is that if you point the mouse at the "Free" spell in your list and
  8162. then press "c" it highlights all the wizards on the board even though that
  8163. is a guaranteed failure.  Such bits would improve the gameplay, usage and
  8164. implementation of Alter Reality, Betrayal, Dark Power, Exorcise, Free,
  8165. Kill, Nuke, Sleep, Subversion and Wake.
  8166.  
  8167. * Now Implemented aforementioned CAST_NOWIZARDCELL and CAST_NOEXPOSEDWIZARD
  8168.   bits into CastInfo.
  8169.  
  8170. * CastInfo[] is now ULONG instead of UWORD.  I had to make a small change
  8171.   in spellman.tex to accomadate this.
  8172.  
  8173. * Betrayal, Free and Subversion can no longer be cast on Artifacts.
  8174.  
  8175. In my opinion, if a spell is guaranteed to fail on a certain type of cell
  8176. then there should be a CAST_BIT for that in the CastInfo[] array.
  8177.  
  8178. * FLAW c key on Raise Dead says you can cast it on your own wizard!
  8179.   We probably either need a CAST_NOLIVING bit or a CAST_MUSTBEDEAD bit.
  8180.   This problem is solved below.
  8181.  
  8182. * AAAAAAAAAUUUUUGGGGHHHHH!!!! MAJOR BUG!!!  I just played a test game and I
  8183.   just cast Raise Dead on an enemy wizard.  The Enemy wizard wasn't dead.
  8184.   He is now MY wizard and he's undead!
  8185.   You can also cast Raise Dead on your own wizard to make him suddenly
  8186.   become undead!   This is all caused because of the
  8187.   lame way of defining classes of objects according to the highness or
  8188.   lowness of their ID number.  Someday I'll go through and eliminate all that
  8189.   stuff like I've been wanting to do for years.  But for now I'll just hack
  8190.   in a quick fix. NOW FIXED.
  8191.  
  8192. * Ok now I've removed all that ID checking code crap and replaced it with
  8193.   IsCreature(cellp) instead.  Well how about that, there are no
  8194.   isCreature(cell) or IsCreature(cellp) macros.
  8195.  
  8196. * NEW MACROS isCreature(cell) and IsCreature(cellp) and isIDcreature(id)
  8197.  
  8198.  
  8199. NOTE: The game is a database.  Therefore all data should be contained in
  8200. the database and not in any way be dependent on the numerical value of the
  8201. ID number being above or below some other numerical ID number.
  8202.  
  8203. All occurences of things like:
  8204.  
  8205.  IF somethingID <= ImpID
  8206.  should be replaced with something like:
  8207.  IF isIDCreature(somethingID)  //  or IF isCreature(cell) // or IF IsCreature(cellp)
  8208.  
  8209. * REPLACED all occurrences of > ImpID with the appropriate creature macro
  8210.        and all occurrences of <=ImpID with the appropriate creature macro
  8211.  in cast.c, all spell files, move.c, and some of the ones in spell.c
  8212.  
  8213. * Note to SAI:  As I was doing the above I found some code in cast.c that can
  8214.   never be executed.  You should probably look at it.  Just search for
  8215.   the LAST occurrence of CatLordID and you'll see it. SAI Fixed the code.
  8216.  
  8217. * There are still numerous occurrences of ImpID sprinkled around in various
  8218.   files but some of them look like they might be using it in a strange way so
  8219.   I didn't mess with them + I'm very sleepy at the moment.  I'll leave the
  8220.   others for SAI.  ALL occurences of ImpID have now been replaced by SAI
  8221.   except for the ones in spellman.tex and reincalc.c.
  8222.  
  8223. The ultimate goal is that someday there should be no references of > someID
  8224. or < someID.
  8225.  
  8226.  
  8227. Ok, now the game is completely messed up.  I just now found out the hard
  8228. way that InitialData[] only exists up to the highest numbered inanimate
  8229. object.  So the isIDcreature macro doesn't work when given a magic spell id.
  8230. (For example the game thinks the VodkaID is a creature when in fact it
  8231. is just a magic spell like Teleport.)
  8232.  
  8233. Ok, but the isCreature and IsCreature macros seem to be working ok.
  8234.  
  8235. * CHANGED isIDmacro from:
  8236.  
  8237. #define isIDcreature(id)       ((InitialData[id].Stat & CREATURE_STAT))
  8238. to
  8239. #define isIDcreature(id) (id<=Wizard8ID and InitialData[id].Stat & CREATURE_STAT)
  8240.  
  8241.  
  8242. **************************************************************************
  8243.  
  8244.  
  8245. ****** Artifact + Sleep Problems **************************************
  8246. Casting sleep on an artifact puts it to sleep but since its owner is
  8247. calculated right after that, it never says that it belongs to ASLEEP.
  8248. Thus you cannot see if it is asleep or not.
  8249.  
  8250. If someone casts sleep on an artifact that belongs to you it will be
  8251. technically put to sleep (so it will collapse at some point) but it will
  8252. still belong to you and you can still attack with it.
  8253.  
  8254. * SOLVED by modifying CalculateArtifactOwners to ignore sleeping artifacts.
  8255. ***********************************************************************
  8256.  
  8257. * REMOVED Temporarily all the ADPCM code from the game since I probably
  8258.   won't really use it for a few more months till the OS2.04+ version and to
  8259.   save memory on the FINAL 1 meg version.
  8260.  
  8261.  
  8262. ********** Major playtest game of Jerry vs. James. ********
  8263. Jerry started with 3 wizards on his team 2 were controlled by him and a 3rd
  8264. was computer controlled.  I started with 2 wizards on my team controlled by
  8265. me.  The remaining 3 wizards were all computer controlled and on their own
  8266. team.  No artifact, no scrolls, no Texas Trash'em, 3 generators.
  8267.  
  8268. * BUG: Sometimes computer controlled wizards attack their ally's
  8269.   creatures.  This only applies to computer controlled _wizards_.  The
  8270.   Creatures of the wizard don't get engaged to or attack allies, only the
  8271.   wizard himself.  Basically computer wizards are trying to mount their
  8272.   ally's mountable creatures.  The problem was in ChooseDestination
  8273.   NOW REWRITTEN AND FIXED.
  8274.  
  8275. BUG: I'm not sure what I did but I may have rapidly hit the lmb then rmb
  8276. near the top of the screen (but I don't think I was in the menu area, more
  8277. like the 1st or 2nd row of cells).  The game then said "Mind Flayer" even
  8278. though there were no mind flayers on the board and in fact the ENTIRE area
  8279. of the board that I clicked in was completely empty.  It said I had 0
  8280. movement points and I couldn't moved or cancel or do anything 8(
  8281. Essentially the game was locked up since I couldn't really do anything.
  8282. This happened in a really important game between myself and my brother.
  8283. Luckily I was running the game under cpr so I hit escape and single stepped
  8284. through the code and FORCED the new_cell variable to be USER_RMB which
  8285. cancelled my turn.  I guess this proves that the RMB was being trapped when
  8286. it wasn't supposed to.  Anyway, once I did that the game proceeded
  8287. normally.  I remember seeing this bug before a very long time ago. Perhaps
  8288. 1 or 2 years ago.  I may have just exited from an info screen right when
  8289. this happened.  I don't know for sure.  Leaving this for SAI.
  8290. JC fixed this bug months later in November 1999.
  8291.  
  8292. * BUG: Somtimes computer wizards cast Plasma Beam for 2 or 3 turns in a row
  8293.   on empty space.  Leaving for SAI.  Fixed by JC months later on October
  8294.   20th 1999.  NOW FIXED.
  8295.  
  8296. Jerry cast Triple on the first turn so I cast Coercion on the first turn to
  8297. negate that.  However, he was coerced for 3 or 4 turns but this apparently had
  8298. NO EFFECT on his Triple spell once the coercion wore off.  When the coercion
  8299. wore off, he still had his triple in force for a long long time thereafter.
  8300. Is that the way it is supposed to work?
  8301.  
  8302. I always thought that spells like Triple work for a set number of game
  8303. turns, regardless of other effects.
  8304.  
  8305. We found out that many spells, like Torment and Coercion, hurt your allies
  8306. as well as your enemies.  Is that the way it is supposed to work?
  8307.  
  8308.  
  8309. **************************************************************************
  8310. TORMENT BUG #1:
  8311. My wizard cast Torment and it lasted a few turns for each wizard, including
  8312. my Ally wizard.  So I simply didn't cast any creatures for a few turns,
  8313. waiting for it to wear off.  But it didn't wear off so I waited a few more
  8314. turns.  This went on for around 10 turns and it never wore off so I figured
  8315. it must be set to last for at least 1 creature cast so I cast a tormented
  8316. creature and sure enough that triggered the removal of the torment.  The
  8317. spell description says "... the effect will hold for several turns of each
  8318. wizard". 
  8319.  
  8320. So either 
  8321. A) The spell needs to be reprogrammed to really work for several TURNS or
  8322. B) We need to change the docs to say "creature casts" instead of "turns".
  8323.  
  8324. * TORMENT description changed to say that it works for several
  8325.   "creature casts".
  8326.  
  8327. TORMENT BUG #2:
  8328. The Torment spell description says that it influences the creature casts of
  8329. "the opposition" when in fact it influences the creature casts of ALL other
  8330. wizards including your allies.  So we need to either:
  8331. A) Change the description to say "all other wizards" or
  8332. B) Reprogram the spell to really only work on opposition wizards.
  8333.  
  8334. * TORMENT description changed to say that it affects "all the other wizards"
  8335.  
  8336. * COERCION description changed to say that it affects "all the other wizards"
  8337.  
  8338. I'm not saying this is how I want Torment et.al. spells to work.  You made
  8339. the spell so its up to you. I don't know how they "should" work, nor do I know
  8340. if it even makes any difference. I'm just saying what I have done for the
  8341. time being to correct the incongruencies.  However a spell works, its
  8342. description should be accururate and not misleading.
  8343. ****************************************************************************
  8344.  
  8345.  
  8346. WEIRD BUG: I cast a tormented Crocodile.  At some point (1-3 turns later) the
  8347. crocodile mysteriously healed back to full life!  The same thing happened
  8348. to all 3 of Jerry's tormented Vultures!  How is this possible?
  8349. Leaving for SAI.
  8350.  
  8351. * BUG: Jerry cast Restoration on my cloaked wizard and it technically removed
  8352.   the cloak but it never redrew the wizard, so for the rest of the game it
  8353.   looked like he was cloaked on the board, but in fact was not. NOW FIXED.
  8354.  
  8355. * BUG: Jerry cast "Orcs" while having a Magic Wand so I told him to press
  8356.   the "c" key to see where all he could cast his orcs but the "c" key didn't
  8357.   work! It doesn't seem to work on any multiplicity spells. NOW FIXED.
  8358.  
  8359. BUG: "c" key over an Orcs spell in your spell list highlights your wizard
  8360. and NOTHING ELSE.  This is because the Orcs spell is defined as CAST_FREE.
  8361. Something needs to be done about this so that all multiplicity spells will
  8362. correctly highlight all the legal cells like they are supposed to.
  8363. Leaving this for SAI.
  8364.  
  8365. It was an extremely close game up until turn 20.
  8366.  
  8367. Game over on turn 30.  Jerry killed me.  I don't think he could have killed
  8368. the independents though, as there was a Devil walking around + other stuff.
  8369. ***************************************************************************
  8370.  
  8371. * FINAL 1 MEG VERSION DONE on April 19th, 1999.  The disk is 99% full with
  8372.   only 9 blocks left.  Here is a list of the main floppy dir.
  8373.  
  8374. Directory "df2:chaos" on Monday 19-Apr-99
  8375. fonts                        Dir ----rwed 01-Dec-98 19:25:17
  8376. Music                        Dir ----rwed 16-Jan-99 14:29:53
  8377. talklists                   9354 ----rwed 14-Mar-99 09:52:32
  8378. Chaos                     343076 ----rwed Today     20:17:05
  8379. chaos.prb                   6800 ----rw-d Today     16:48:00
  8380. classic.prb                 6543 ----rw-d Today     16:48:00
  8381. pool.ssc                   43545 ----rwed Today     16:58:57
  8382. Start_Chaos                  311 ----rwed 31-Mar-98 05:49:42
  8383. Start_Chaos.info            2570 ----rw-d 01-Dec-98 20:10:17
  8384. chaos.dat                  66688 ----rwed Today     17:02:00
  8385. 8 files - 2 directories - 953 blocks used
  8386.  
  8387. Memory Consumption during Intro:
  8388. Chip RAM:  467608
  8389. Fast RAM:  382376
  8390.  
  8391. Memory Consumption during Setup:
  8392. Chip RAM:  459224
  8393. Fast RAM:  469624
  8394.  
  8395. During the game:
  8396. Chip RAM:  267000
  8397. Fast RAM:  482728
  8398.  
  8399. During info screen:
  8400. Chip RAM:  281000
  8401. Fast RAM:  483384
  8402.  
  8403. During the "About" Requester:
  8404. Chip RAM:  369000
  8405. Fast RAM:  483488
  8406.  
  8407. During the "Save As" Requester:
  8408. Chip RAM:  299400
  8409. Fast RAM:  486952
  8410.  
  8411. During the "Quit Game" Requester:
  8412. Chip RAM:  317800
  8413. Fast RAM:  483344
  8414.  
  8415. * PLAYED 1 test game on 7Mhz 68000.  Everything seemed to work ok, but the
  8416.   "End Turn" confirmation was too slow.  Oh well.
  8417.  
  8418. * Chaos_2.5r and Chaos_2.5d are both in /ChaosArchives/ directory.
  8419.  
  8420. * Uploaded v2.5d demo version to Aminet.  Upload rejected as usual.
  8421.  
  8422. * Worked on music for several days then:
  8423.  
  8424. **************************************************************************
  8425.  
  8426.       HARD DRIVE CRASH!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  8427.  
  8428.       ALL PARTITIONS LOST !!!!!!!!!!!!!!!!!!!!!!!!!!
  8429.  
  8430.       DAY OF DOOM!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  8431.  
  8432.       AAAAAAAAAUUUUUUUUUUUGGGGGGGGGGGGHHHHHHHHHH!!!!!!!!!!!!!
  8433.  
  8434. I can't access the source code, my word processor, my email, the internet,
  8435. the compiler.... NOTHING...
  8436.  
  8437.  
  8438. This was EXTRA bad because I'm using an Amiga 3000 with the ROM in a file
  8439. in DEVS:Kickstart, which means if the hard drive doesn't work then neither
  8440. does the computer.
  8441.  
  8442. After getting really depressed for a couple of days I finally started
  8443. looking for my old 120 meg HD that used to be in my A3000.  That took an
  8444. entire day and I was unlucky enough that it was in the LAST place I looked.
  8445. (as in I gave up because I had looked EVERYWHERE except this one last box,
  8446. it was the only thing I hadn't looked through... well whaddayaknow there it
  8447. was.)
  8448.  
  8449. Ok, so I put the old drive in and I could at least boot up my amiga.
  8450. LUCKILY I was smart enough to have installed some basic internet software
  8451. on that drive before removing it and throwing it in the shoebox or I would
  8452. REALLY have been dead in the water.  Unfortunately I had only tcp/ip and
  8453. irc installed. So no web browsing or ftping for me. 8(
  8454.  
  8455. It was like being teleported back in time to 1989 8(
  8456.  
  8457. Well after talking to numerous people on the net and doing lots of research
  8458. about hard drives for a whole week, I finally figured out the problem and the
  8459. solution.
  8460.  
  8461. The problem was: The original AmigaDOS had a limit of a 4gig drivesize.
  8462. (I had thought it was a 4gig partition size).  That's right, in 1985 when
  8463. Bill Gates compatible PCs had a 40 meg limit, the Amiga had a 4096 megabyte
  8464. limit.  The amiga has a 32-bit operating system and the largest number that
  8465. a 32-bit number can hold is exactly 4 gigs.
  8466.  
  8467. WHAT HAPPENED: When I wrote a file to the hard drive it "wrapped around"
  8468. from the 4gigth block to block 0 and overwrote the Rigid Disk Block and
  8469. associated data blocks that keep track of what partitions are on a drive
  8470. and where they are located.  This happened because the HIGHEST partition is
  8471. my WORK partition of 1.6 gigs size and this is the one I put all my stuff
  8472. in.  It was 49% full at the time of the crash.
  8473.  
  8474. The solution is any 1 of the following:
  8475. A) Don't use drives of larger than 4 gigs.
  8476. B) Use drives of larger than 4gigs but don't actually use more than 4 gigs
  8477.    of its space.
  8478. C) Upgrade to the newest FFS (FastFileSystem) which is 64 bit.
  8479.  
  8480. Since my drive was already formatted under the old FFS I just took the easy
  8481. way out and did option B.  I repartioned my drive to not use the upper 20
  8482. megs of space.  Losing 20 megs out of 4,300 megs is irrelevant.
  8483.  
  8484. HOW I RECOVERED MY DATA:  I just used RDB-Salv from Aminet which went in
  8485. and figured out where my partions were, how big, etc.  It worked perfectly
  8486. on the first try.  Then I repartioned my drive with HDtoolbox to the
  8487. correct specifications (the exact same ones as when I set it up
  8488. originally).  Then I used DiskSalv from Aminet to salvage all files off the
  8489. 1st partition.  The 1st partition is my boot partition with workbench and
  8490. it was partially overwritten in the crash.
  8491.  
  8492. Disksalv recovered EVERY file except for 3.  1 of the files was easily
  8493. replaced from its original source.  The 2nd file was just some useless
  8494. program I had downloaded once upon I time so I just deleted it.  And the
  8495. 3rd file was a mysterious unknown and unused file of complete irrelvance to
  8496. anything (I guess it was left over from some old program I once deleted).
  8497.  
  8498. There were numerous other small problems that arose from me switching my
  8499. hard drives around, these were related to improper SCSI termination (since
  8500. I don't have the manual to the 120 meg drive) and to not doing "save
  8501. changes" in HDtoolbox.
  8502.  
  8503. Recovery operation completed on May 15th, 1999.  For the previous 12 days
  8504. no work was accomplished on Chaos and I got really stressed out.
  8505.  
  8506.  
  8507.             HARD DRIVE REPAIRED
  8508.  
  8509. ***************************************************************************
  8510.  
  8511. ***************************************************************************
  8512. JJ BUG REPORTS on v2.5r:
  8513.  
  8514. * BUG: Game does not work.  This turned out to be because he had renamed
  8515.   the game dir to "Chaos 2.5" and the path determination code couldn't handle
  8516.   spaces.  This never would have happened if we had made the game require
  8517.   OS2.04 or higher since then we'd just use PROGDIR:   NOW FIXED.
  8518.  
  8519. -------------------------------------------------------------------------
  8520. * LOAD/SAVE BUG: If you save a game with wizards in trees then reload it
  8521.   there is a MAJOR problem: When the tree collapses the wizard is invisible
  8522.   and "he's there but not really there" which makes him impossible to kill.
  8523.   Ok, this was because the WizardInfo structure said UBYTE id instead of
  8524.   UWORD id. NOW FIXED.
  8525.  
  8526. * LOAD/SAVE BUG STILL THERE: The loading and saving routine had the
  8527.   following problems:
  8528.  
  8529. From the Load Routine:
  8530.  
  8531. // j is an int so this doesn't work right.
  8532. // This reads the wizard id into the upper word of the int j so the id
  8533. // will ALWAYS be wrong.
  8534.            fread ((char *)&j, sizeof(USHORT), 1, fh);
  8535.            wiz->id = FileCode[j];
  8536.  
  8537. From the save routine:
  8538. // j is an int so this doesn't work right
  8539.      j = InternalCode[wiz->id];
  8540.      fwrite ((char *)&j, sizeof(USHORT), 1, fh);
  8541. // This Writes out the upper word of the int (which is always 0)
  8542.  
  8543.    ALL NOW FIXED.
  8544. --------------------------------------------------------------------------
  8545.  
  8546. When he saves a game it says "save complete" but then the hard drive
  8547. flashes a few seconds later.  He thinks that if you don't WAIT for this to
  8548. happen that it messes things up.
  8549.  
  8550. * COMPLAINT: He always plays as player 8 so when he saves the game he has to
  8551.   WAIT for all the first 7 wizards to reselect all their spells. Therefore
  8552.   he doesn't bother saving the game anymore since its too annoying.
  8553.  
  8554.   This same thing has been bothering me (JC) for some time now but since I
  8555.   always play as player 1 or 2 it didn't bother me badly enough to try to fix
  8556.   it.  I was going to fix this problem when I add internet capability to the
  8557.   game since the current gamesave just WON'T work with internet play.
  8558.   It must be modified to allow for saving at ANY person's spell-selection
  8559.   point, not just player #1's.
  8560.   But since it is such a problem for JJ we might need to fix it sooner.
  8561.   TEMPORARILY BAND-AID PATCH FIXED by reducing BASE_DELAY from 2 seconds to
  8562.   2 tenths of a second.  IMPLEMENTED.
  8563.  
  8564.  
  8565.  
  8566. save at beginning of spell selection phase.=YUK.
  8567.  
  8568. * MAJOR BUG: highlight ? with mouse then click on some cells.  It will lock
  8569.   up quite frequently.  Usually happens with cells on the upper right of the
  8570.   board. 
  8571.  
  8572. Note from JC:--------------------------------------------------------
  8573. I have now verified that this bug is NOT caused by his Qmouse Mouse
  8574. accellerator.  It is in fact caused by a bug in OS 1.3 and below.  It
  8575. happens when pressing the mouse button (the right one I think) in the dead
  8576. area between the 2 screens on the information panels.
  8577.  
  8578. I absolutely, positively DO NOT have this bug on my A3000 with OS 3.1.
  8579.  
  8580. There may be a work around for this but I don't care.  Its just another
  8581. good reason to hurry up and make the game require OS 2.04 or higher.
  8582. ---------------------------------------------------------------------
  8583. ABOVE BUG NOW FIXED on OS 1.2 / 1.3 by hacking in some "IF OS <= 1.3 THEN
  8584. TrapRMB" code.
  8585.  
  8586. * MAJOR BUG: Right Mouse Button on load/save screen under OS 1.3 locks up the
  8587.   program.  This is caused by the fact that the requester opens its own
  8588.   window without the TRAPRMB bit set.  I don't know any way to make the
  8589.   requester open a TRAPRMB window.  So we need to work around this bug some
  8590.   other way or just require OS 2.04 or higher.  OK, I have simply turned
  8591.   off the MENUVERIFY feature for the HiResWindow during the loading and
  8592.   saving screens and now it works perfectly under OS 1.3.  NOW FIXED.
  8593.  
  8594. * MOVED TrapRMB and PassRMB #defines from chaos.c into defines.h
  8595.  
  8596. * COMPLAINT: he puts in the wizard names for each player with a number on
  8597.   the end to indicate their player number.  Then he plays a game.  Whenever
  8598.   he starts a new game it then RE-randomly generates all the names over again
  8599.   and he has to re-enter the numbers on the end.  Ok, I have now fixed this
  8600.   so that names are only randomly generated once when you first load the game
  8601.   and then never again.  NOW FIXED.
  8602.  
  8603. END OF JJ Bug Report.
  8604. **************************************************************************
  8605.  
  8606. * FLAW: A human wizard can no longer attack a tree that is occupied by
  8607.   another wizard.  It just says "already occupied".
  8608.   I Changed this to not attack if the tree is occupied by an ally, otherwise
  8609.   attack the tree even if the tree itself is on your team.  Ditto for all
  8610.   meditations.  This change does not affect computer wizards and does not
  8611.   allow any of your own creatures to attack your own meditations.
  8612.   NOW FIXED.
  8613.  
  8614. * NEW FUNCTION GetWizardCodeSameTeam to support above feature.
  8615.  
  8616. * SPEEDED UP: Lissajous box menu thingies.
  8617.  
  8618. * BUG: I move my player 2 wizard into my ally's dark citadel and now I can't
  8619.   move him out!  He's trapped!  This was caused by the the fact that the
  8620.   "clear movement bit" code was OUTSIDE the main loop!  So the MOVED bit was
  8621.   only being cleared after all players had moved!  Thus I never noticed this
  8622.   since for player 1 (who I usually play) the MOVED bit was properly cleared.
  8623.   But for ALL other players the MOVED bit was set totally wrong.  I went back
  8624.   and looked at all the old source code versions on my HD and they all have
  8625.   this same bug! ack.  NOW FIXED.
  8626.  
  8627. * Compiled a new v2.5 and this is REALLY the final 1 meg version.
  8628.  
  8629. Around June 1, 1999?
  8630. * My car blew up.  No work accomplished for 2 weeks.
  8631.  
  8632. * bought a used car.  It broke down within 24 hours.  No work accomplished.
  8633.  
  8634. * My mom's car broke down.  No work accomplished.
  8635.  
  8636. * CHANGED: Killing a generator now allows you to pick from 4 bonus spells
  8637.   instead of only 2; thus reflecting the extreme difficulty of killing a
  8638.   generator.
  8639.  
  8640. * BUG: Computer wizards cast vodka on artifacts a lot, this effectively wastes
  8641.   the vodka spell. I have now simply removed the CAST_ARTIFACT from the
  8642.   CastInfo field so this is NOW FIXED.
  8643.  
  8644. Alleged Bug:  I just cast Seperation on a cloaked computer wizard and it
  8645. didn't seperate him!!!  He is still in an alliance with all the other
  8646. computer wizards!!!!!  No, that is just the way the spell works.  You don't
  8647. cast it ON anyone.  It is a cast_free spell that just seperates yourself.
  8648.  
  8649. * BUG: If you save the game while Tormented, then reload, you suddenly have
  8650.   a MagicWand and Vodka powerup.  NOW FIXED.
  8651.  
  8652. * BUG: Depth removes line-of-sight requirements but its description says
  8653.   it is only supposed to allow unlimited range without changing line of
  8654.   sight requirements.  This is due to a limitation in the spellcasting engine
  8655.   that any spell with max range automatically does not require line of sight.
  8656.   There is currently NO WAY to have a spell have unlimited range yet require
  8657.   line of sight.  So we need to either reduce the range of Depth down to 14
  8658.   and edit the description accordingly, or we need to change the description
  8659.   of depth to say that it removes line of sight requirements also.  Or we
  8660.   could change depth to be that it doesn't change range but it removes line
  8661.   of sight requirements.  Or ???
  8662.  
  8663.   OK, here is what I did: I changed the Depth description to state that you
  8664.   get unlimited range + you don't need line of sight.
  8665.  
  8666. * NEW SPELL: Crystal Ball.  This spell removes line of sight requirements
  8667.   for all spells.
  8668.  
  8669. * NEW SPELL: Ubiquiscope.  The Ubiquiscope is like a combination of Crystal
  8670.   Ball + Magic Wand.
  8671.  
  8672. * 11 NEW SPELLS: Fly, Singular Earthbind, Dual Earthbind, Nonarchery, Convert,
  8673.   Sword of Sassenrath, Cursed Sword, Mount, No Mount, No Grow, The Exorcist.
  8674.  
  8675. I haven't made any new graphics for any of my new spells.  I'm hoping this
  8676. will help motivate me to do the graphics upgrade. The only exception is The
  8677. Exorcist which I pirated the graphics from the Bandit and made the Bandit
  8678. use the graphics from the Annis, then I deleted the Annis since it didn't
  8679. seem to have any real purpose. The Exorcist still needs to be redrawn so
  8680. that he is holding a cross in his hand.
  8681.  
  8682. BUG in Spellmanager: The following lines from Ubiquiscope cause a fatal error:
  8683. ComputerAssist:
  8684. Imagery:    STATIC
  8685. Leave this for SAI.
  8686.  
  8687. BUG in something: When processing the 2nd image of the new animated bandit
  8688. the compilation stops with "Invalid Section Code".  I have temporarily
  8689. worked around this by making the bandit be STATIC once again.  Leaving this
  8690. for SAI to fix.
  8691.  
  8692. -------------------------------------------------------------------------
  8693. I stayed up all night playing a serious game.
  8694.  
  8695. Lately I've been playing the game a lot with me controlling 1 wizard
  8696. against all the other computer wizards who are all on the same team against
  8697. me.  99 spells, unlimited turns, 6 artifacts and 6 scrolls, 4 artifacts,
  8698. Texas Trash'em, Computer Level 0, no classic, no impurities, no agent
  8699. casting.  I can almost always win.  I frequently win under 20 turns.
  8700. Maybe I was just having good luck?
  8701.  
  8702. So today I played as above but with only 5 artifacts and 5 scrolls.  I lost
  8703. 3 games in a row.  Once on turn 3.  Once on turn 8.  On my 4th game I was
  8704. FINALLY able to win on turn 73. For the last 15 turns of the game I was
  8705. getting dangerously low on spells.  It was a constant struggle to shoot
  8706. down walls with my bolters in order to keep getting a fresh supply of
  8707. spells rolling in.
  8708.  
  8709. In the beginning of the game they were blowing my creatures away left and
  8710. right.  I had no chance.  So I got in my castle and hid out while they
  8711. built this ridiculously HUGE army of mega-powerful super-duper-turbocharged
  8712. powered-up creatures.  I was going to DIE as soon as my castle collapsed
  8713. but then someone cast alliance on me.  HA HA.  So I spent a jillion turns not
  8714. really knowing what the hell I was going to do or how on earth I could win.
  8715. blah blah blah.  Turn after turn went by.  I had NO shooting creatures so I
  8716. couldn't "accidentally" shoot my allies.  To make it worse I didn't even
  8717. have any brain drains to go kill a wizard.  All I did was eventually cast
  8718. some wall spells to box in 2 of the wizards.  I used my creatures to box in
  8719. a 3rd one.  (I had only killed one wizard at the beginning of the game.)
  8720.  
  8721. To give you an idea of how powerful these guys were, they went around
  8722. mowing down all the generators, even though the dragon nests produced LOADS
  8723. of dragons for them to fight.
  8724.  
  8725. Then lo and behold, a wizard cast a bolter wall right into the middle of
  8726. the board and things started looking up for me!  I quickly cast subversion
  8727. on it, then recover boost, then double, then simulacrum then cloak then
  8728. replicate.  One of my allies was even nice enough to cast Range Boost on
  8729. one of my newly acquired Bolter Walls. hehe.
  8730.  
  8731. With my new army of 5 bolter walls I was ready to whoop some ass but I was
  8732. surrounded by jillions of trees, gooey blobs, dragons, undead creatures and
  8733. you name it.  The board was about 90% full.  So it took me FOREVER to be
  8734. able to kill an enemy wizard.  Then 2 forevers to kill the next one.
  8735.  
  8736. I got so many bonus spells that by the end of the game my wizard was so
  8737. powerful that he could cast ANYTHING ANYWHERE he wanted.  I was casting
  8738. Grizzly Bears halfway around the board. hehehe.
  8739.  
  8740. My score was 3031 which was 7x higher than anyone elses.  But the whole
  8741. opposing team combined had well over 2000.
  8742. --------------------------------------------------------------------------
  8743.  
  8744. * BUG: I vanished wizard 6 and then there was an enforcer hit on his turn!
  8745.   This only happened on the turn IMMEDIATELY after I cast vanish on him.
  8746.   It never happened again after that.  Ok, this was a problem with the game
  8747.   trying to move a wizard who had been warped.  I have now fixed MoveWizard()
  8748.   to check the .warped bit and exit if it is set.  NOW FIXED.
  8749.  
  8750. * MODIFIED isStupidCast to prevent casting of Speed and Fly on Bolter Walls. 
  8751.  
  8752. * NEW FLAG: FLAG_HIGHCR for the Archery and Nonarchery spells so that
  8753.   computer wizards will use them more intelligently.
  8754.  
  8755. * BUG: There is something wrong in the movement routine!  The Exorcist can't
  8756.   move! It says "Cannot attack the living" when trying to move into an empty
  8757.   space!  There are no other creatures nearby.  Happened on turn 1.
  8758.   The problem was in isInvalidAttack() NOW FIXED.
  8759.  
  8760. * BUG: uhmmm.. I've killed every single thing on the board and the game
  8761.   isn't ending.  This was caused by GetMass() not returning the correct
  8762.   number.  NOW FIXED.
  8763.  
  8764. * BUG: uhmmm.. I've killed every single thing on the board and the game
  8765.   isn't ending.  This was caused by LoadLevel() not setting the "Level"
  8766.   variable correctly (it was some totally weird number when it should have
  8767.   been 0).  NOW FIXED.
  8768.  
  8769. BUG: Enforcer hits on score screen at end of game.  I encountered this once
  8770. and then I was never able to duplicate it.  So I have no idea how it
  8771. happened. ???
  8772.  
  8773. * PROBLEM WITH VICTORY CONDITIONS: When playing the game with the default
  8774.   settings of 4 generators you sometimes win on the first turn without even
  8775.   doing anything! (when the generators don't generate anything on turn 1).
  8776.   So I changed it so that to win the game you must now either kill or block
  8777.   all independent generators.  NOW FIXED.
  8778.  
  8779. * PROBLEM: When I select "Save as" I like to save the game with the turn
  8780.   number as part of the filename.  But then I have to go back and check the
  8781.   score panel, then do save as again which is annoying.  So now I display
  8782.   the turn on the "Save as" panel and the "About" panel too. NOW FIXED.
  8783.  
  8784. * When the game ends it now tells you WHY it is ending.
  8785.  
  8786. ENFORCER HIT: I shot and killed my own wizard with my Blue Dragon and then
  8787. when I ended my turn it caused an enforcer hit.  Leaving this for SAI.
  8788.  
  8789. * UPLOADED v2.5d DEMO version to aminet on Sunday, June 27th, 1999.
  8790.  
  8791. *************************************************************************
  8792.                         BEGIN MUSIC UPGRADE
  8793. *************************************************************************
  8794. June 27th, 1999:
  8795. The dir Chaos_2.5/ has the FINAL 1 MEG VERSION in it.
  8796. The dir Chaos_2.6/ has the version with the new music in it.
  8797.  
  8798. * MUSIC is now played during spell-selection phase.  I played a couple of
  8799.   test games with 6 theme songs installed and it was MUCH better than 0 theme
  8800.   songs like we've had in the past but it still wasn't nearly enough.
  8801.  
  8802. * The game feels MUCH more upbeat with the new music!!!!
  8803.  
  8804. * BUG: When starting a new game the colors on the HiRes part of the setup
  8805.   screen are all wrong and it is positioned wrong too.  FIXED.
  8806.  
  8807. * BUG: When starting a new game the colors on the HiRes part of the
  8808.   gameboard are wrong. FIXED.
  8809.  
  8810. * BUG: Several of the new Sidewinder protracker mods won't work with the
  8811.   playroutine. They are playing EXTREMELY slowly.  I converted them to
  8812.   MED MMD1 so this is NOW FIXED.
  8813.  
  8814. * MODIFIED the game so that if you turn off sound and speech then the music
  8815.   plays continuously through the spell-selection, spell-casting and movement
  8816.   phases of the game, only changing at the beginning of the next turn.
  8817.  
  8818. * INCLUDED CD advertisement for Sidewinder CDs into the docs.
  8819.  
  8820. *** Color My World Modifications ***********************
  8821. * Shortened the intro.
  8822.  
  8823. should be at 52: c-3  a#2  b-2
  8824.  
  8825. Sequences with main tune:
  8826. 12,13,14,15,16, 17, 18, 19, 20, 45, 46, 47, 48,  51, 52, 71, 72, 75, 76, 
  8827. 11,09,09,12,10, 13, 14, 15, 16,
  8828.  
  8829. 12 has a bleep that I might remove.
  8830. 13 has breaking drumbeat I might remove. Nah leave it alone.
  8831.  
  8832.  
  8833. * BAD NOTE: 02 had a bad sounding note so I copied the block to 65 and
  8834.   fixed it.  block 02 is no longer used.
  8835.  
  8836. block 11 has extra stuff in it that interferes.
  8837. Block 11 is just like block 36 except for track 3 which is totally
  8838. different.
  8839.  
  8840. * I didn't like the way block 11 sounded, the notes from 2 different tracks
  8841.   were colliding with each other so I copied 11 to 64 and then wiped out
  8842.   track 2.  Block 11 is no longer used.
  8843.  
  8844. * NEW BLOCK:
  8845.   I was absolutely certain about all the changes I made so far but for this
  8846.   next one I'm not at all sure.  I made a new pattern 66 and couldn't decide
  8847.   where to put it or if it should even be in the song?  How do you decide the
  8848.   order or your blocks?  Do you use some sort of formula?  Or do you just
  8849.   throw them in there randomly?  I've always wondered about this.
  8850.   I put it near the end.
  8851. ***************************************************************************
  8852.  
  8853.  
  8854.  
  8855. * BUG: sometimes wizards cast Plasma Beam for some strange reason.
  8856.   then they always cast it up to the left, even if nothing is there, or even
  8857.   if it attacks multiple creatures that they own while not hurting any
  8858.   enemies.  Leaving this for SAI to investigate.  Fixed by JC months later on
  8859.   October 20th, 1999. NOW FIXED.
  8860.  
  8861.  
  8862. * BUG in protracker play routine.  There is a bug in the playroutine that
  8863.   causes certain protracker mods to play back incorrectly.  It sounds like
  8864.   the notes are being played back about 100x too slowly.  I have no idea how
  8865.   to debug this so I'm just converting the affected mods to MED format.
  8866.   Converted LOTS of protracker mods to MED MMD1 format.
  8867.  
  8868. * NEEDED: Dear SAI, could you please adjust the loading and saving such that
  8869.   player 3 can save the game, and then when reloading the game it will reload
  8870.   to player 3's spell selection phase?  Thanks.  Implemented by JC in August
  8871.   1999.
  8872.  
  8873. I am currently under death threats from Brian Dixon and my car has been
  8874. vandalized twice so I am under duress and I must now move.
  8875.  
  8876. ReleaseSemaphore(&SourceCode) by JC on July 3, 1999.
  8877. ObtainSemaphore(&SourceCode) by SAI on 5 July, 1999.
  8878.  
  8879. * OBSOLETED: EditPopupIDCMP is now handled my the main HandleIDCMP routine.
  8880.   This means that "q" querying etc. now works properly in the editor.
  8881.  
  8882. * Temporarily turned off the end of turn confirmation as I find it annoying.
  8883. * The menumode variable is now local to HandleIDCMP.
  8884. * Improved the implementation of the popup creature menus using an array
  8885.   of functions.
  8886. * Tidied up documentation in editor.c.
  8887.  
  8888. * Fixed a bug in ClearBoard().
  8889. * Fixed an incorrectly line relating to the CatLord in cast.c.
  8890. * Examined the remaining occurrence of ImpID occurring in the source.
  8891.   I was able to replace most of them with isIDcreature type constructs.
  8892.   The following occurrences remain:
  8893.    -- in the enumeration in defines.h (pretty obviously needed)
  8894.    -- in io.c (1 occurrence) in probability saving block
  8895.         [[ actually this code looks broken because it is only saving
  8896.            spell probabilities for creatures ]]
  8897.    -- in reincalc.c (1 occurrence). Since this is not compiled into the
  8898.       final game, I'm happy to leave this one alone and avoid having
  8899.       to include extra files.
  8900.  
  8901.    I eliminated all occurrences from spell.c, but because of how the
  8902.    loops work this file (among others) still depends on all creatures
  8903.    coming before other spells!
  8904.    Note from JC: it will be like that for a long time to come because I
  8905.                  won't have time to fix it for a very long time.
  8906.  
  8907.  
  8908. ReleaseSemaphore(&SourceCode) by SAI on 19-August-1999
  8909. ObtainSemaphore(&SourceCode) by JC on August 19th, 1999
  8910.  
  8911. * End Turn Confirmation is now an option in the menus. Default is OFF.
  8912.  
  8913. * PROBLEM: The "about" screen with the pentagrams hashes sometimes.  It
  8914.   hashes a lot and looks utterly terrible under heavy CPU load.  NOW FIXED
  8915.   by increasing the taskpri to 100 during the doublebuffer switching.
  8916.  
  8917. * PROBLEM: The credits scrolling is not 100% smooth and is very jerky
  8918.   under heavy CPU load.  NOW FIXED by increasing taskpri to 100 during
  8919.   the doublebuffer switching.
  8920.  
  8921. ***************************************************************************
  8922. * NEGATIVE SCORE BUG:  I played a game against JJ and I won but my score
  8923.   was negative and his was positive so he claimed he was really the winner.
  8924.   In the current version of the game shooting the following scrolls gives
  8925.   the following points:
  8926.  
  8927. Scrolls of creatures award as many points as the original life of the real
  8928. creature.
  8929.  
  8930. moveit -124
  8931. Pox shield -125
  8932. acid rain -123
  8933. devastation -1
  8934. touch of god -116
  8935. ball lightning -114
  8936. plasma beam -113
  8937. sword of sassenrath -118
  8938. cursed sword -110
  8939. nomount -86
  8940.  
  8941.   Other scrolls have various (mostly HUGE) positive scores associated with
  8942.   them.  This is all caused by bad subscript errors.  Points are awarded
  8943.   according to the .Life statistic. But Magic Spells don't have a
  8944.   .Life statistic so it just accesses some other data.
  8945.  
  8946. Simply replace all occurrences of ScoreAdd(player,InitialData[id].life)
  8947. with IF IsScroll(cellp) THEN
  8948.         ScoreAdd(player,1)
  8949.      ELSE
  8950.         same line as before
  8951.      END_IF
  8952.  
  8953. Made required changes to DevastationHandler() also.
  8954.  
  8955. DONE AND FIXED.
  8956. *****************************************************************************
  8957.  
  8958. * Above fix increased the filesize of cast.o just enough to start producing
  8959.   Error 502: Reference to function > 32768.  So I had to change the
  8960.   makefile for cast.c to use code=far.  NOW FIXED.
  8961.  
  8962. * BUG: DeathBringer struck a scroll dead.  NOW FIXED.
  8963.  
  8964. * PROBLEM: We keep getting Emails from NTSC users who don't know how to
  8965.   PALboot their Amiga.  I added in the AmigaToPAL cli command which
  8966.   requires OS 2.04 or higher. Now the game automatically puts the computer
  8967.   into pal mode. FIXED.
  8968.  
  8969. * BUG: Pressing 'q' on the creatures on the alt-o menu thing shows the
  8970.   spell description instead of their stats.  NOW FIXED.
  8971.  
  8972. * PROBLEM: I was implementing Spell-List editing so I made a new file
  8973.   "SpellListedmenu.dat" and I adjusted the makefile to run menumaker on it
  8974.   just like edmenu.dat.  But this produces 2 different files, each with their
  8975.   proper menu data, but each uses the exact same same variable names!
  8976.  
  8977.   I have worked around this by hand-editing SpellListedmenu.c so that all
  8978.   variables start with "sl".
  8979.  
  8980.   Is there a more general way that you want to work around this?
  8981.  
  8982.  
  8983. ****************************************************************************
  8984. *****                 Spell-List Editor Upgrade                        *****
  8985. ****************************************************************************
  8986.  
  8987. Since SAI has become burned out on coding and the game is suffering from a
  8988. lack of attention I have hatched an ingenious plan! }8)
  8989.  
  8990. I have decided to implement a Spell-List editor for Chaos this way
  8991. (hopefully) I can get SAI to design some levels for me to have fun playing.
  8992.  
  8993. This will allow us to maintain development momentum.
  8994.  
  8995. These days I have very limited time to spend working on the game and this
  8996. was the simplest coding upgrade I could think of.  It took me my entire 2
  8997. days off + 1 work day to implement it.  This doesn't bode well for my other
  8998. upgrade plans. 8(
  8999.  
  9000. Now that we have spell-list editing we can start making REAL levels for
  9001. Chaos!  YAY!!!   Now when I come home from work and I'm too tired to
  9002. program, maybe I'll have enough energy to do some level designing.
  9003.  
  9004.  
  9005.  
  9006. Implement Spell-list editing ROUGH NOTES:
  9007. * 0. Have a seperate spell-list editor which is different from the "board
  9008.      editor"
  9009. * 1. Its easy.  Just make a SpellBoard for storing the spell list onto.
  9010.      DONE.
  9011. * 2. You select "Edit Spell List" from the Main Menu.  DONE.
  9012. * 3. Figure out where the code goes when you select "Edit Spell List" ???
  9013.      DONE.
  9014. * 4. delete copy and paste work exactly the same as in the board-editor.
  9015.      DONE.
  9016. * 5. Modify HandleIDCMP + make new menu.  DONE.
  9017. * 6. Need CopySpellsFromListToBoard(player)
  9018.      (do this once at the beginning + anytime the player number is changed) DONE.
  9019. * 7. Need CopySpellsFromBoardToList(player)
  9020.      (do this whenever you select "quit" or change player number) DONE.
  9021. * 8. Need alt-i for "insert" an empty space into the spell-list. DONE.
  9022. * 9. Need alt-d to delete just as in the board editor unless it is used
  9023.      on an empty cell in which case the empty cell is deleted and all cells
  9024.      to the right are scooted 1 space to the left. DONE.
  9025.  
  9026. Anytime you select a player number the SpellBoard is cleared and rebuilt
  9027. with the selected player's spell list.
  9028.  
  9029. then by pressing alt-o it switches to the backup board and displays all the
  9030. available spells just like in the board editor.
  9031.  
  9032. alt-o MUST switch from board to backupboard and then back to board!
  9033. Don't switch back to realboard!!!!  Because sometimes board will be
  9034. realboard and sometimes it will be spellboard.
  9035.  
  9036. Choose a spell, switch back to the SpellBoard, and place it in the spell list.
  9037.  
  9038. Only the first 150 positions are used.  You should normally only use the
  9039. first 99.
  9040.  
  9041. Upon exiting the first 150 positions on the SpellBoard are copied into the
  9042. real spell list of the player.
  9043.  
  9044. When you place a spell it goes "on top of" the one that is already there.
  9045. Thus you can immediately delete a just-placed spell and the old spell will
  9046. be there.  A miniature undo feature.
  9047.  
  9048.  
  9049. August 26th, 1999
  9050. Ok, now the Spell-List editor works great but...  I still haven't
  9051. worked out how to fix the gamesave format to save on a particular person's
  9052. turn! 8(   I shouldn't start designing any levels till I figure that out
  9053. and modify the gamesave format accordingly.
  9054.  
  9055. ******************************************************************************
  9056. *****                END of Spell-List Editor Upgrade                    *****
  9057. ******************************************************************************
  9058.  
  9059. ******************************************************************************
  9060. *****                    Gamesave Format Upgrade                         *****
  9061. ******************************************************************************
  9062.  
  9063. * currentPlayer is now saved.
  9064. * BUG: ExorcistID is listed in the translation table twice!       FIXED.
  9065. * BUG: Probability information was not completely saved.          FIXED.
  9066. * BUG: the currentSpell was being saved but not translated.       FIXED.
  9067. * BUG: When you save the game it resets back to player 1's turn.  FIXED.
  9068. * BUG: When you load a game it resets back to player 1's turn.    FIXED.
  9069.  
  9070. * REMOVED old stuff that is no longer needed.
  9071.  
  9072. August 31st, 1999
  9073. OK, now gamesaving works perfectly!  You can save on anyone's turn and
  9074. upon reloading it reloads back to that player's turn.
  9075.  
  9076. * BUG: The FavoriteFoodID and RunsAwayFromID is not translated like all the
  9077.   other ids.  So the first time we add a new spell to the game, all our
  9078.   previously designed levels will have creatures with messed up tastes and
  9079.   fears.  NOW FIXED.
  9080.  
  9081. * ADDED: Lots of extra BYTES, WORDS and ULONGS to the header block for
  9082.   future expansion.  This way I hopefully won't need to convert levels from
  9083.   old format -> new format everytime I add a new option to the game.
  9084. * ADDED: Lots of extra BYTES, WORDS and ULONGS to the cell structure for
  9085.   future expansion.
  9086. * ADDED: Lots of extra BYTES, WORDS and ULONGS to the char_stat structure
  9087.   for future expansion.
  9088.  
  9089. * HOPEFULLY I can now do a complete major upgrade or 2 or 3 and not have to
  9090.   convert all the old levels up to the new format.
  9091.  
  9092. ******************************************************************************
  9093. *****                 END of Gamesave Format Upgrade                     *****
  9094. ******************************************************************************
  9095.  
  9096. ******************************************************************************
  9097. *****                     Line of Sight Upgrade                          *****
  9098. ******************************************************************************
  9099.  
  9100. * BUG: If you are trying to cast a roper or bolter wall etc. along a 45°
  9101.   angle, the "l" key will show that you have line of sight but sometimes the
  9102.   "c" key says you don't!  And when the "c" says you can't cast it there you
  9103.   really can't cast it there even though it is in range and you have line of
  9104.   sight!  This is caused by a problem in isLineOfSight.  isLineOfSight
  9105.   _SHOULD_ work perfectly but it doesn't.  I don't know why. Its like it is
  9106.   off by 1 or something.  This problem only occurs when there are generators
  9107.   adjacent to the 45° path.  If you want to investigate this mystery then
  9108.   please do so.  In the meantime I have solved the problem by replacing all
  9109.   occurrences of isLineOfSight C code with isLineOfSightQ asm code. NOW FIXED.
  9110.  
  9111. * SPEEDUP: Computer controlled shooters now decide who they will shoot over
  9112.   2x as fast as before!
  9113. * SPEEDUP: Computer AI is now MUCH faster than before!
  9114. * SPEEDUP: "c" key is now over 3x as fast as before!
  9115. * SPEEDUP: "s" key is now much faster!
  9116.  
  9117. * BUG: isLineOfSightQ does not automatically return TRUE when the source
  9118.   cell is the destination cell.  (This prevented me from casting Combat on
  9119.   myself)  NOW FIXED.
  9120.  
  9121. ******************************************************************************
  9122. *****                   END Line of Sight Upgrade                        *****
  9123. ******************************************************************************
  9124.  
  9125. * FIXED various bugs with the Mass Ressurrect spell + pox or reincarnation
  9126.   or vanquished foes.  It was all very broken.  NOW FIXED.
  9127.  
  9128. *************************************************************************
  9129. ** Remove Owner from the animation byte and transfer it to its own byte**
  9130. *************************************************************************
  9131.  
  9132. Methodically go through and replace all >> 3 occurences with a
  9133. GetPlayer() call.  Replace all occurrences of << 3 with a 
  9134. ChangeOwner(cell) subroutine that does everything needed to change the
  9135. owner of a cell to another person.
  9136.  
  9137. * All occurrences of PLAYER_MASK, << 3 and >> 3 have been REMOVED from all
  9138.   spell files.
  9139. * All occurrences of >> 3 have been REMOVED from chaos.c, info.c, move.c
  9140.   and predicate.c
  9141. * All but 1 occurrence of >> 3 REMOVED from core.c (it refers to oldflag).
  9142. * All but 1 occurrence of >> 3 REMOVED from editor.c (it refers to buffercell).
  9143. * All occurrences of << 3 have been REMOVED from chaos.c and init.c
  9144. * Did not replace any occurrences of << 3 in core.c as all the uses seemed
  9145.   to be very lowlevel.
  9146.  
  9147. * Backed up the Chaos_2.61 dir to Chaos_2.62.  Work will proceed in
  9148.   Chaos_2.62 dir.
  9149.  
  9150. * Redid the cell structure so that there are .owner and .oldowner bytes
  9151.  
  9152. * All remaining occurrences of << 3 and >> 3 REMOVED!
  9153.  
  9154. * Anywhere there is a reference to .oldflag will be added a reference to
  9155.   .oldowner.  DONE.
  9156. * Check all references of .flag and if refering to player number then replace
  9157.   them with .owner.  DONE.
  9158. * Went back and looked at EVERY usage of .flag, ->flag, .oldflag and
  9159.   ->oldflag and looked for anything susupicious and fixed it.
  9160.  
  9161. * Eliminated 40 occurrences of code like "& PLAYER_MASK >> 3" and
  9162.   "|= Player << 3" Thus saving at least 360 bytes of code.
  9163.  
  9164. * WizardInfo structure now has a .owner byte also.  Modified BackupWizard()
  9165.   and RestoreCellWizard() and io.c appropriately.
  9166.  
  9167. * ALL files 100% cleaned up!
  9168.  
  9169. * Played a test game.  Saved and Loaded multiple times.  Everything works.
  9170. * Sending to SAI on September 9, 1999.
  9171.  
  9172. *****************************************************************************
  9173. ** END Remove Owner from the animation byte and transfer it to its own byte**
  9174. *****************************************************************************
  9175.  
  9176. * NEW FUNCTION: CenterWriteText
  9177.  
  9178. * REGISTERED USER on September 17th: a nice chap from Ireland mailed in his
  9179.   registration fee. He has an AGA Amiga 1200 tower with Zorro IV Busboard,
  9180.   Picasso IV gfx card, 50 Mhz 060, 64 Megs of RAM, Power Flyer, etc.
  9181.  
  9182. * Added Sidewinder to the Scrolling Credits.
  9183. * Played Sean's Levels 1-4 and 10.  Added turns_left to the about screen.
  9184. * Added Registered_Text to hold the registered user's name.
  9185.  
  9186. ******************************************************************************
  9187. *****                   Exploration Mode Upgrade                         *****
  9188. ******************************************************************************
  9189.  
  9190. I was originally not going to implement exploration mode until the graphics
  9191. upgrade programming was done.  But since I have extremely limited time
  9192. these days I've re-ordered my priorities to do this upgrade first since it
  9193. seems nice and easy and provides the MAXIMUM improvement in gameplay.
  9194.  
  9195. When exploration mode is on you cannot see cells which you have not
  9196. explored.  Once you have explored a cell it stays permanently explored,
  9197. there is no need to maintain line-of-sight to the cell.  This makes the
  9198. gameplay nice and simple, the way I like it.
  9199.  
  9200. Most creatures simply explore the cell they are in and all adjacent cells.
  9201.  
  9202. Some creatures, like Eagles explore further and can see behind walls due to
  9203. flying high in the air.
  9204.  
  9205. Other creatures, like snakes, can "feel" the movements of other creatures at
  9206. far distances, thus allowing them to map cells which are hidden behind
  9207. walls that cannot be seen by normal creatures.
  9208.  
  9209. Certain other creatures can hear or smell other creatures.
  9210.  
  9211. This adds the "Explore-the-Map" play mechanic to the game.  You can't see
  9212. any cells until you have sent a unit to map them.  Once mapped the cell
  9213. remains visible forever even if you have no nearby units or no
  9214. line-of-sight.
  9215.  
  9216. You can also see the cells that your allies can see.  But if they stop
  9217. being your ally then you can no longer see those cells.
  9218.  
  9219. I love games where you must explore the level and map it out.
  9220.  
  9221. Having Exploration Mode turned ON makes the game MUCH harder since you
  9222. have no idea what direction you should be going in the early stages of the
  9223. game.  Nor do you have any idea what direction you will be attacked from
  9224. at first.
  9225.  
  9226. Exploration mode makes computer movement more CPU-intensive which is
  9227. why I waited so long to implement it.  Now that the game is aimed at a 2
  9228. meg 020+ amiga it shouldn't be a problem.
  9229.  
  9230. Exploration mode doubles the amount of fun generated by the game IMHO.
  9231.  
  9232. I was going to wait and implement Exploration after I did the graphics
  9233. upgrade but due to my extremely limited time I had to reprioritize things
  9234. and am now implementing the simplest upgrades first.
  9235.  
  9236.  
  9237. Rough Notes:
  9238. I added ExploreCell(cell) line of code to the following routines:
  9239. RestoreCell
  9240. RestoreCellWizard
  9241. InsertCreature
  9242. WarpIn
  9243. Growth
  9244. the teleport spell
  9245. MoveTempest
  9246. MoveVortex
  9247. CrMove1
  9248. cMoveEngaged
  9249. cMoveNonEngaged
  9250. CalculateArtifactOwners
  9251. WakeUp (used by Subversion, Betrayal and Wake)
  9252.  
  9253. * REWROTE Charm, Raise Dead, Mass Ressurrect and Swap spells to use
  9254.   ChangeOwner()/changeOwner() or InsertCreature
  9255.  
  9256. Hopefully that is all the places that needed it.  Can you think of any
  9257. routines that magically cause a creature to appear somewhere that don't
  9258. use the above routines?  If so they probably need ExploreCell(); added 
  9259. somewhere.
  9260.  
  9261. * 0. Modify io.c to handle loading/saving all the new stats. ALREADY DONE.
  9262. * 1. Convert spellman.tex into a real JC file since I will be editing sm.c.
  9263.      DONE.
  9264. * 2. You MUST have a real cellnumber for the ExploreCell() routine!!!!
  9265.      Because you hafta do sqDistance from the cell numbers! DONE.
  9266. * 3. Write the real exploration routine. DONE.
  9267.      MUST TAKE INTO ACCOUNT CanBeSeen or CantBeSeen!!!!! DONE.
  9268.      Change CanBeSeen into CantBeSeen etc.  DONE.
  9269.      Take into account sleeping, dead, scrolls and nobody artifacts. DONE.
  9270. * 4. Adjust AutoMouse Routine.  DONE.
  9271. * 5. Adjust information panels.  DONE.
  9272. * 6. Adjust ReDrawCell.  DONE.
  9273. * 7. Adjust animator task.  DONE.
  9274. * 8. Make ChangePlayerView Routine.  DONE.
  9275. * 9. Modify sm.c to handle all the new stats. DONE.
  9276. *10. Add the stats into the spell files.  (Only nonstandard creatures need the
  9277.      stats added in.  Others use the built-in defaults.)  DONE.
  9278.      I made all snakes feel out 6 squares.
  9279.      Snakes cannot be felt, smelled or heard.  Only seen.
  9280.      All living flying creatures don't need LOS to see.  And most see out 2
  9281.      squares.
  9282.      Eagle, Falcon and Vulture have Excellent eyesight.
  9283.      Spectator, Achiyalabopa and Harpy have poor eyesight.
  9284.      Vulture, Dire Wolf and Arctic Wolf have excellent sense of smell.
  9285.      I couldn't really decide what to do about other creature's senses.
  9286.  
  9287. I keep saying eyesight but maybe I should really change it to
  9288. "cartography"?
  9289.  
  9290. Still need to consider flying undeads.
  9291.  
  9292. Still need to consider some ground creatures which can see out 2 squares
  9293. and requireLOS.
  9294.  
  9295. Perhaps archers and ogre mages could have excellent eyesight?
  9296.  
  9297.  
  9298. Useful table of sqRanges:
  9299.  
  9300. 1 = just the 4 adjacent cells.
  9301. 2 = all 8 adjacent cells.  (out 1 diagonally)
  9302. 4 =                  (2 horizontally)
  9303. 8 = all 16 adjacent cells. (out 2 diagonally, 2 horizontally)
  9304. 9 =                  (3 horizontally)
  9305. 18= out 3 diagonally (4 horizontally)
  9306. 32= out 4 diagonally (5 horizontally)
  9307. 36=                  (6 horizontally)
  9308. 50= out 5 diagonally (7 horizontally)
  9309. 72= out 6 diagonally (8 horizontally)
  9310. 98= out 7 diagonally (9 horizontally)
  9311.  
  9312.  
  9313.  
  9314. ****  OOPS!  Now I remember why I was supposed to wait until the graphics
  9315. upgrade was complete before I implemented all this stuff!  All those cloak
  9316. images drawn on the board for player 1's view are blocking LOS for
  9317. everybody!  If I had done the graphics upgrade first this would not be any
  9318. problem at all.  Drat. ****
  9319.  
  9320. *11 solve the problem of all those cloaked cells blocking los for the
  9321.     computer players while player 1 is watching the action!
  9322.     A. Calculate AutoFailArray.  Easy.  If it isn't explored then its
  9323.        autofail else its not.  DONE.
  9324.     B. When you explore a cell you 0 out that element of AutoFailArray +
  9325.        you recalc the AutoAcceptArray for that cell.  DONE.
  9326.     C. Modify JC LOS routine to take into account AutoFail. DONE.
  9327.     D. Make the AutoFail() function just like AutoAccept() Function. DONE.
  9328.     E. Make the AutoFailArray[] just like AutoAcceptArray. DONE.
  9329.     F. Make the CalculateAutoAcceptAndFail FUNCTION.  DONE.
  9330.     G. Modify asm code to use AutoFailArray. DONE.
  9331.     H. OOPS.  Above mods didn't work due to lack of registers so I'm
  9332.        ELMINATING the AutoFailArray[] and using AutoAcceptArray[x] == -1
  9333.        to mean that it is an AutoFail cell.  This saves a register in the asm
  9334.        code and it also saves 1 instruction in the main loop.
  9335.        This new way is super efficient. DONE.
  9336.  
  9337. Normally I would simply have the "board" displayed to the screen using
  9338. cloaked cells for unexplored cells.  And all LOS calculations take place on
  9339. the shadow board which has the shadow masks of every cell  there all the
  9340. time no matter what.  + unexplored == autofail.  Everything would work
  9341. perfectly and effortlessly and quickly.
  9342.  
  9343. Ok but i don't have the shadowboard yet because I haven't done the gfx
  9344. upgrade yet so I will just hack in a secret rastport which has the images
  9345. of everything for los calculations.
  9346.  
  9347. So redrawcell and animator will simply draw 2 images, one to the display
  9348. based on playerview, and 1 to the shadowboard which is the real image.
  9349. LATER ON it will draw 2 "images" but the 6 bitplane images only go to the
  9350. screen and the shadowboard only gets a 1 bitplane image. (The ShadowMask
  9351. which will all be done automatically by my asm cellrendering routines which
  9352. I coded like 2 years ago!
  9353.  
  9354. Damn this whole double rastport method  will be slow and lame and waste
  9355. TONS of chipmem!!!
  9356.  
  9357. I need to do the gfx upgrade so I can do the REAL shadowboard!!!!
  9358. This hacked-in method is messing up the sound effects! (Really this is a
  9359. problem with the sound effects system being dependent on cpu speed.)
  9360.  
  9361.     I. Create ShadowBoardMem, ShadowBoardBitMap and ShadowBoardRastPort
  9362.        along with initialization and cleanup code.  DONE.
  9363.  
  9364. September 21st, 1999.  My evil mom broke my $550.00 Commodore 1950
  9365. Multisync monitor!  ARRGGHHH!!!  I had to switch back to my $50.00
  9366. Commodore 1084S.  ack.  Now I hafta use 640x256 resolution!  I'm back in
  9367. the stone ages!  I'm going to die of lameness!
  9368.  
  9369.     J. Modify ReDrawCell and Animator Task. DONE.
  9370.     K. Modify LOS routine to use the ShadowBoardRastPort when
  9371.        ExplorationMode == YES
  9372.        This requires creating a new LOSBitPlane variable which normally
  9373.        will = LoResBitPlane but when ExporlationMode==YES
  9374.        LOSBitPlane will = the first byte of the first bitplane of the ShadowBoard.
  9375.        Setup and Asm Code properly modified. DONE.
  9376.  
  9377. * TESTED OK September 22, 1999:  Ok at this point I have never actually
  9378.   tested any of the above modifications A-K.  So I just set PlayerView==1
  9379.   and ran the game to test out the above changes.  EVERYTHING WORKS PERFECTLY!
  9380.   Its totally amazing!  Geez I must be a 40th level megacoder!  I can explore
  9381.   the map and I can't see the enemies, its totally kewl!
  9382.   Well my Vulture (which can see 3 cells) and my Pegasus (which can see 2
  9383.   cells) are totally mapping out the board super fast.  This has convinced me
  9384.   to reduce the sightranges of all flying creatures.
  9385.   Vulture and Eagle will see out 2 squares diagonally.  All other flying
  9386.   creatures will be set to see only 1 square out just like the ground
  9387.   creatures (except flying creatures don't need LOS so if their sightrange
  9388.   ever gets increased they'll be able to see over walls and things.) DONE.
  9389.  
  9390. * 12. Replace all occurrences of HighLightCell= with a call to the new
  9391.       HighLight() function which will check that the cell is visible to
  9392.       the current PlayerView before highlighting it.
  9393.       HighlightCell=-1 becomes HighLight(-1); etc.   ALL DONE.
  9394. * 13. Entering the board editor or spell editor should set ExplorationMode=NO
  9395.       and upon exiting it should be returned to its former status.  DONE.
  9396. * 14. Changing spell-selection phase, spell-casting phase or movement
  9397.       phase to a human player should do a ChangePlayerView();  DONE.
  9398. * 15. Cell effects which only affect 1 cell need to be modified so that if
  9399.       the cell is not visible to the current PlayerView then they are not
  9400.       drawn.  I don't know if they should still make the sound or not???
  9401.       I simply made CellEffect() do nothing (no gfx or sound) if it is
  9402.       taking place in an unexplored cell for now since that was the easiest
  9403.       way to do it.  DONE.
  9404. * 16. Make MaskWritePixel(); function for use by the graphical effects in
  9405.       ExplorationMode.  DONE. 
  9406. * 17. ThreeBeam has a flaw in that it sometimes writes pixels to negative
  9407.       coordinates.  The OS clips these and doesn't display them but still it
  9408.       shouldn't be trying to write pixels to -1,-2 coords.  NOW FIXED.
  9409. * 18. ThreeBeam needs to be modified so that the pixels which would have
  9410.       been plotted in unexplored areas are not.  Only pixels which plot into
  9411.       explored areas really get drawn.  Replace all WritePixel() calls with
  9412.       MaskWritePixel() which will return 1 if it wrote the pixel and 0 if it
  9413.       wrote nothing.  Add up the return values and if >0 then do the AUDIONote
  9414.       else don't. DONE.... Later on... I have now decided that I like
  9415.       hearing the sounds of what is going on in unexplored regions so I no
  9416.       longer mask the sound on this effect.  DONE.
  9417. * 19. Modify PlotBreath(), PlotBolt() and BirdShot() as above.  DONE.
  9418. * 20. Modify BoardEffect() to not do the effect on unexplored cells. DONE.
  9419. * 21. Modify Cycle() / Bow weapon.  This automatically fixes
  9420.       WeaponEffect() and WeaponEffectDrawer().  I intentionally
  9421.       left the sound effects in place and only hide the graphics.  DONE.
  9422. * 22. Lightning() will be left as it is because there is no easy way to mask
  9423.       it.  If you cast it you reveal your position.  DONE.
  9424. * 23. WizardExplode() will not be masked simply because I like to know when
  9425.       an enemy wizard has died, even if he dies in the vast expanse of the
  9426.       unexplored regions.  DONE.
  9427. * 24. New function: CompletelyRecalculateTeamExplore(); This function must
  9428.       be called any time the teams change for any reason.  DONE.
  9429. * 25. Alliance, Separation and core.c "death of wizard" code modified to
  9430.       use CompletelyRecalculateTeamExplore();  Tested and works great!  DONE.
  9431. * 26. Exiting the spell editor or board editor doesn't redraw the board right
  9432.       because REDRAWALL doesn't redraw all those empty explored spaces!
  9433.       So I changed ReDrawAll to redraw everything (even empty spaces)
  9434.       IF ExplorationMode==YES.  DONE.
  9435. * 27. At beginning of game set playerview  to 15 since that will show a solid
  9436.       grey board.  DONE.
  9437. * 28. September 29, 1999: The next problem requires a change to the gamesave
  9438.       format so I am starting a new version now.  Begin Version 2.6.3.
  9439.  
  9440. * 29. MAJOR PROBLEM WITH REPULSION: The Replusion spell copies cells around
  9441.       using board[x]=board[y] style code.  But this copies the exploration
  9442.       bits to so it ends up exploring areas that you've never been too and it
  9443.       looks buggy.
  9444.  
  9445.       Also the clone, hyperclone and warp spells use board[x]=board[y] code
  9446.       which means they are copying around the exploration bits of players that
  9447.       they are not supposed to!
  9448.  
  9449.       Also the movement routines and other places use board[x]=board[y] style
  9450.       of coding producing imperfect results for ExplorationMode.
  9451.  
  9452.       POSSIBLE SOLUTIONS:
  9453.       A. Make a new "CopyCell" routine which copies everything EXCEPT the
  9454.          exploration info.
  9455.       B. Take the exploration bits out of the cell structure and make them
  9456.          their own array.
  9457.  
  9458.       I have opted for Option B because it is the easiest and most logical
  9459.       way to code it.
  9460.       There is now an Exploration[] array and an ExplorationTeam[] array.
  9461.       I have removed them from the cell structure and modified the macros and
  9462.       exploration code appropriately.
  9463.       This neccessitates a new block of code for the gamesave/load routines.
  9464.       ALL DONE.
  9465. * 30. FLAW: I was playing a test game in ExplorationMode and I started out
  9466.       with Triple, Red Dragon, Replicate, Cloak.  So I had 6 red
  9467.       dragons, 3 of which were cloaked so I was trying to explore the map as
  9468.       fast as possible so I was flying each dragon deep into unexplored territory.
  9469.       I clicked on my cloaked dragon and moved him deep into an unexplored
  9470.       area and the game made a funny noise and my dragon was gone!  At
  9471.       first I didn't know what the hell had happened.  Then I realized
  9472.       that I had flown him into a pit.  Poor little dragon 8(
  9473.       NOW FIXED with informative text message.
  9474. * 31. A computer player cast Vengeance on wizard 1 while it was on wizard 2's
  9475.       view and it showed the spunge effect on the unexplored cell! Wrong.
  9476.       Its not supposed to do that!  Modified SpungeColour() to use
  9477.       MaskWritePixel()  NOW FIXED DONE
  9478.  
  9479. * 32. The Following spells need to be investigated/modified to call
  9480.       ExploreCell() in an appropriate manner: Repulsion, Replicate,
  9481.       Simulacrum, HyperClone, Teleport, The time when any creature warps back
  9482.       in to the board, Turmoil, Vortex, Tempest, Roper teleportation,
  9483.       GrowthRoutine, Horror, Passsage.  ALL DONE.
  9484.  
  9485. Please keep in mind that from this point on if you copy cells around you
  9486. must have a corresponding ExploreCell() call.  Furthermore if the
  9487. original cell is being erased then the ExploreCell() call must happen AFTER
  9488. the original cell is erased (for line-of-sight reasons).
  9489.  
  9490.  
  9491. Question: Should inanimate objects and growths explore cells just as well
  9492. as living creatures?  I am thinking that maybe we should set their
  9493. sqSightDistance down to 0 so they will only explore the cell that they are in
  9494. and no further.  What do you think I should do?  On the other hand leaving
  9495. things as they are means that casting Meteor Storm is actually usefull now
  9496. and it also can prompt human players to cast walls and trees around wildly
  9497. in an attempt to spot generators or dragons.  So I think I'll leave things
  9498. as they are.
  9499.  
  9500. At this point (September 30th, 1999) I have already played numerous test
  9501. games and everything has apparently worked ok but there is one fundamental
  9502. thing still to be done in order for creatures which have long-range sensory
  9503. perceptions which require Line-Of-Sight. (I don't think there are currently
  9504. any such creatures, but there will be one day.. or such creatures will be
  9505. manufactured through the use of magic spells).  This brings us to #33.
  9506.  
  9507. * 33. BUG: Any creature with e.g. sqSightRange of 32 and SightRequiresLOS==YES
  9508.       can't actually see that far because the close-up unexplored cells
  9509.       block LOS to the further away unexplored cells therefore:
  9510.       ExploreCell() must be modified to sort all the cells on the board
  9511.       into ascending order of distance from the observer. Then this sorted
  9512.       list of cells will be used instead of just going through the cells
  9513.       from 0 to 239.  NOW FIXED AND DONE.
  9514.  
  9515. PLAYED a test game with the sound off.  I controlled 2 wizards against 4
  9516. generators with Texas Trash'em OFF and no artifacts or scrolls.
  9517. ExplorationMode=ON.  Boy the game sure is harder when ExplorationMode is on
  9518. and Texas Trash'em is off!  I LOST THE GAME ON TURN 26.  I had been
  9519. fighting for my life in a hopeless battle for several turns.  I'm glad they
  9520. finally put me out of my misery. 
  9521.  
  9522. One interesting thing is that I cast my Meteor Storm on turn 3 and it
  9523. helped me map out the level quite nicely.
  9524.  
  9525. If I had played the game where both my wizards were in an alliance then I
  9526. think I could have won the game but I never had LOS for Wizard #2's
  9527. RangeBoost to be cast on Wizard #1's Elf.  That one problem ruined
  9528. everything for me.  If they had been in an alliance they would have had LOS
  9529. to cast powerups on each other. My score was 219+82.
  9530.  
  9531. * 34. Speed up the "derive Cell from pixel coords" code in MaskWritePixel by
  9532.       using my LSRCellHeightShiftBitMultGAMECOL[y] technique from cell.c. DONE
  9533. * 35. NEW MACRO CellFromPixel(x,y)  using maximum speed technique.  DONE.
  9534.  
  9535. * 36. ChangeExplorationMode() routine.  DONE.
  9536.  
  9537. * 37. Modify all Numeric keypresses to check that the cell is really visible
  9538.       to the current PlayerView before highlighting it.
  9539.  
  9540. PROBLEM: when you press the "c" key over a spell which "works over the
  9541. entire world and does not require line of sight" on the first turn of the
  9542. game, you can sort of cheat and see the positions of enemy wizards.
  9543. This applies to Armour, Cursed Sword, Dark Power, Vengeance, etc.
  9544.  
  9545. What should we do about this?
  9546. A. Leave it as is.  (and this will explain why computer players use such
  9547.    spells on creatures they can't "see")
  9548. B. Change the "c" key to only highlight explored cells, even though the
  9549.    cast is legal.
  9550. C. Simply add a new CAST_NOTONUNEXPLORED or CAST_EXPLOREDONLY bit to certain
  9551.    spells such as Vengeance, Dark Power, Justice, Armour, Cursed Sword, etc.
  9552.    Probably every spell which doesn't need Line-of-Sight would need
  9553.    CAST_NOTONUNEXPLORED.  Also add "Cannot cast on unexplored cell" to the
  9554.    2nd info panel of the spell information thing.
  9555.  
  9556. I have chosen option C and have modifed EVERY SPELL which does not need LOS
  9557. except for the following exceptions:
  9558. I Intentionally did not add CAST_NOTONUNEXPLORED to the Bury, Magic Glass,
  9559. Iridium, MassMorph, Mutate, NoGrow, Pit, TheExorcist, Singular Earthbind,
  9560. Spectator, Teleport, Thundermare, Vodka and Weak Wall.  If there are any
  9561. complaints about this then I can add it in to these spells too.  I'm not
  9562. too sure about all this.  Only time will tell.
  9563.  
  9564.    Should I also add CAST_UNEXPLOREDONLY for the proposed mapping spell
  9565.    that lets you map out a bunch of cells?
  9566.  
  9567. * PROBLEM: Pressing the 'l' key on a blank cell only highlights  that cell
  9568.   and the 8 adjacent cells because the owner of that cell (NOBODY) has not
  9569.   explored any cells.  I put some special code in AutoFail() so now the 'l'
  9570.   key works like it always did.  NOW FIXED.
  9571.  
  9572. * BUG: Moving a creature into an unexplored cell causes him to not be
  9573.   highlighted anymore, even though he still gets to shoot.  The problem is
  9574.   that the destinationcell is being highlighted before it has been explored,
  9575.   thus the highlighting is not shown.  NOW FIXED.
  9576.  
  9577. * 38. Added CAST_NOTONUNEXPLORED to the spellinfo screen.  DONE.
  9578.  
  9579. * 39. Added SightRange, FeelRange, SmellRange and HearRange to creature
  9580.       info panel 2nd screen.  DONE.
  9581.  
  9582. * 40. Changed the Ghost and Drelb so they can't be felt or smelled.  DONE.
  9583.  
  9584. * 4 NEW SPELLS: Cartography, Alternography, Seismology, Telescope.
  9585.   Alternography majorly kicks ass!
  9586.  
  9587. * After adding the new spells I loaded up the old levels to see if they
  9588.   still worked and ... THEY DO! 8)
  9589.  
  9590. * BUG: Highlight() routine is highlighting the computer wizard's creatures
  9591.   even though they are in areas which are unexplored by me.  NOW FIXED.
  9592.  
  9593. ******************************************************************************
  9594. *****               END Exploration Mode Upgrade                         *****
  9595. ******************************************************************************
  9596.  
  9597. Before I implemented the ExplorationMode upgrade, I had worked out the full
  9598. details of the "Play By Email" upgrade and it was going to be easy for me
  9599. to implement it.  But the ExplorationMode makes "Play By Email"
  9600. implementation far more complicated.... i.e. I no longer know how to do it.
  9601.  
  9602. * CANCELLED: The Play by Email upgrade has been CANCELLED until someone
  9603.   registers the game who has a netconnected Amiga.
  9604.  
  9605. * New routine DepthWriteText to replace FancyWriteText which only has the
  9606.   outline thing down and to the right 1-4 pixels.  Much faster + looks
  9607.   better.  DONE.
  9608.  
  9609. October 3, 1999:  My mom poisoned me with insecticides and hair spray so
  9610. I'm extremely ill.  So I can't work :( Symptoms of my illness include, my
  9611. entire body aches, I have no strength to stand up, any input of food or
  9612. water causes a violent output reaction.  Fever 101.5.  I can't lay down or
  9613. I throw up.  I can't move or I throw up from extreme nausea, its like
  9614. having super severe motion sickness.  I must sit perfectly still.  Diarhea,
  9615. stomach ache, etc.
  9616.  
  9617.  
  9618.  So I will just playtest another level.
  9619.  
  9620. Playtest SAI LEVEL 7.
  9621. Level 7: The game says I won on turn 14 even though my wizard was about 2
  9622. turns away from the exit.  I would have won 1 turn sooner I think but there
  9623. is a bug in the game where if you move a creature next to an undead and get
  9624. engaged and try to attack it then the game gets stuck and you can't cancel
  9625. the creature's move without clicking the "end turn" gadget.  Sometimes "end
  9626. turn" cancels just that 1 creature's move.  But this time it ended my turn
  9627. and I didn't get to move my other creatures!!!
  9628.  
  9629. I have now tried to duplicate this bug by playing various test games and
  9630. the bug is not reoccurring.  My unicorn was adjacent to some inanimate
  9631. objects when the bug happened and maybe this is somehow affecting things.
  9632. This is an example of a time when I should have saved the game every turn
  9633. so I could replay that turn and see what is happening.
  9634.  
  9635. Ok I reloaded the level and replayed it and uhmm... the bug is gone.  I
  9636. can't make it happen again.  It must be some very technical thing that
  9637. happens. 8(  UNSOLVED MYSTERY.
  9638.  
  9639. * BUG: When loading a game, probabilities are all messed up on the info screen!
  9640.   Just save every translated spell id, then every probabilty.
  9641.   ID,prob
  9642.   ID,prob
  9643.   etc...
  9644.   Ok I made the changes but it still doesn't work!
  9645.   Ok I tried a different method and it still doesn't work!
  9646.   4th attempt: Ok I got it working now.  It was a problem with the
  9647.   translation.  I will really be glad when the game is a proper database so
  9648.   we can get rid of all this lame translation crap!
  9649.   Total time wasted 2.5 hours.  NOW FIXED.
  9650.  
  9651. * UPGRADED All SAI's Levels to the new format successfully.
  9652.  
  9653. * YUCK! Some color combos in the credits intro are terrible.  I have
  9654.   made a better color combo for the bright red text.  DONE.
  9655.  
  9656. * FLAW: When a Bolter Wall is the last computer controlled thing to move it
  9657.   stays highlighted well into the next phase of the game.  Way longer than it
  9658.   is supposed to.  NOW FIXED.
  9659.  
  9660. * I tried to duplicate the "Kill your own wizard and get an enforcer hit"
  9661.   bug but every time I kill my own wizard there is no enforcer hit. ???
  9662.  
  9663. * DOUBLED the speed of ClearBoard();
  9664.  
  9665. * PROBLEM: It takes me forever to find the spell I want when I'm designing
  9666.   levels and testing things.  SOLUTION: Alphabetized the list of objects in
  9667.   the alt-o object chooser menu.  DONE. SOLVED.
  9668.  
  9669. There should be a menu option like "Pick Object" or something so we don't
  9670. have to press "alt-o" all the time.  Leaving this for SAI.
  9671.  
  9672. * DARK WOOD INCONGRUENCY: The description says they are undead but their
  9673.   undead_stat is not set.  NOW FIXED.
  9674.  
  9675. * AAUUGH! I cast animate on an independent generator and nothing happened!
  9676.   I have now changed the spell description to say "This spell has no effect
  9677.   on generators."  FIXED.
  9678.  
  9679.  
  9680. ****************************************************************************
  9681. *******              My First Level Playtest Notes                   *******
  9682. ****************************************************************************
  9683. 1st attempt:  I was dead on turn 9.  All 6 generators generated on turn 1. 
  9684. I had no chance.
  9685. Independents had score 87, life 358.  I had life 0, score 9.
  9686.  
  9687. Jerry's First Attempt: He died on Turn 10.
  9688. Independents had score 93, life 295.  He had life 0, score 8.
  9689.  
  9690. Attempt 2: I died on turn 11.  Independent life 261, score 78.
  9691. My life 0, score 45.
  9692.  
  9693. Attempt 3: DAMMIT I WAS GOING TO WIN AND THIS STUPID MudMan thing with 0
  9694. maneuverability just moved next to my wizard and killed him even though he
  9695. should have been engaged to my zombie!!!!!  Engagement routine needs to be
  9696. investigated!
  9697.  
  9698. Reloaded the savegame from a few turns back but this time the generators
  9699. were meaner to me and I died on turn 18.
  9700.  
  9701. * ENGAGEMENT ROUTINE FIXED: The routine now works like this:
  9702.   If you are next to 1 enemy creature THEN
  9703.      If you have  0 maneuverability you are ENGAGED.
  9704.      If you have 15 maneuverability you are NOT ENGAGED.
  9705.      If you have  1 maneuverability you have 1 chance  in 15 of not being engaged.
  9706.      If you have  2 maneuverability you have 2 chances in 15 of not being engaged.
  9707.   The engagement system is now totally logical and easy to understand.
  9708.  
  9709.  
  9710. Attempt 4: Won on turn 41.  My life: 147  Score 1161
  9711. Independent life 0 score 64.  I was only able to win because I killed a
  9712. generator and then got a Dragon Nest as my bonus spell.  But I suppose that
  9713. just makes up for my lousy luck during the rest of the game.  If you can
  9714. survive till turn 30-something you start getting really good spells that
  9715. allow you to become an effective offensive fighting force.
  9716.  
  9717.  
  9718.  ** Found the Secret Scroll **
  9719. Attempt 5: Won the game on turn 11.
  9720.  
  9721.  
  9722.  
  9723. Level 2: I won on turn 25.  Wasn't really very hard.
  9724.  
  9725. Level 3: I died on turn 5!  A Basalt Golem charged up at me from unexplored
  9726. space and whacked my already weakened wizard and killed him!  I had NO idea
  9727. he was out there!
  9728.  
  9729. Level 3: Attempt 2: I died on turn 16!
  9730.  
  9731. ****************************************************************************
  9732. *******             END My First Level Playtest Notes                *******
  9733. ****************************************************************************
  9734.  
  9735.  
  9736. * PROBLEM: You can't install Chaos to your HD by simply dragging the drawer
  9737.   icon to the HD because the req.library must also be copied to the LIBS:
  9738.   I have now changed it so that it will open the library from LIBS: or from
  9739.   the libs/ dir in the chaos dir so now the game is SUPER EASY TO INSTALL!!!
  9740.   NOW FIXED.
  9741.  
  9742.  
  9743.  
  9744. Ok I am now going to implement 2 new spells.  One will make an inanimate
  9745. object become a creature and the other will make a creature become an
  9746. inanimate object.  So what do I call these 2 spells?
  9747.  
  9748. Inanimorphobiosis or "Stone to Flesh" or "Animate"?
  9749. The trouble with calling it "Stone to Flesh" is that it doesn't turn
  9750. "stone" to "flesh" it turns any inanimate object (such as trees) into a
  9751. creature.  However this would make the spellname be the converse of the
  9752. "Flesh to Stone" spell.
  9753.  
  9754. The trouble with calling it "Animate" is that it doesn't animate the
  9755. graphic of the recipient.  It will still be a static image.  OOPS there is
  9756. already an "Animate" spell.
  9757.  
  9758. Petrify or "Flesh to Stone" or Deanimate?
  9759.  
  9760. OK, for now I will have Stone to Flesh, Inanimorphobiosis and Flesh to
  9761. Stone.  Inanimorphobiosis will be a stronger/rarer version of Stone to Flesh.
  9762. Mass Petrification will be a stronger/rarer version of Flesh to Stone.
  9763.  
  9764. * 4 NEW SPELLS: Stone to Flesh, Inanimorphobiosis, Flesh to Stone, Mass
  9765.   Petrification.
  9766.  
  9767. Stone to Flesh and Inanimorphobiosis are extremely powerful.  I need to either:
  9768. A) Reduce its probability.
  9769. B) Make it a bonus spell.
  9770. C) Make it have a CAST_NOGENERATORS
  9771. D) Make it so that it doesn't change owners.
  9772.  
  9773. I'm going with option D for Stone to flesh and option B for
  9774. Inanimorphobiosis.
  9775.  
  9776.  
  9777. * I went back and modified most of my spells to use implode cell effect for
  9778.   when something bad is happening to the recipient and implode+explode cell
  9779.   effect for when something good is happening to the recipient.  DONE.
  9780.  
  9781. * SOUND EFFECTS fully reinstated in ExplorationMode.  I have decided that I
  9782.   like to hear all the sound effects of events that happen in unexplored
  9783.   areas so I modified CellEffect() to only mask the gfx in unexplored areas
  9784.   NOT the sound effects.  DONE.
  9785.  
  9786. * BUG: Intro credits monster list sometimes has messed up colors.
  9787.   This was a problem where I had MSGRandom()%4 instead of the proper
  9788.   (MSGRandom()%3)+1  NOW FIXED.
  9789.  
  9790. * SPEEDED up the intro credits a bit.
  9791.  
  9792. * SMALL BUG IN JCformat:  Whenever a program line uses a \" after a " there
  9793.   is sometimes a messup in the alignment and/or a bogus error gets reported.
  9794.   No data is lost but it just isn't aligned right.  This could be seen in
  9795.   sm.c which has a lot of \" constructs.  I had to add an additional test to
  9796.   2 routines.  This is all NOW FIXED.
  9797.  
  9798. * ELIMINATED 2 hardcoded references to Wizard8ID and replaced them with
  9799.   IsCreature() test.
  9800.  
  9801. * VODKA changed to allow you to cast it on the independents.  Now the spell
  9802.   is actually useful for something :)
  9803.  
  9804. * CAST_ARTIFACT added to spell information screen.
  9805.  
  9806. * BUG: Enemy Computer wizard cast Stone to Flesh on my wall for me.  I have
  9807.   now added FLAG_OWN to the spellflags so that computer wizards will only cast
  9808.   this spell on their own creatures.  NOW FIXED.
  9809.  
  9810. * CHANGED SWAP: to not swap inanimate objects.
  9811.  
  9812. * BEGIN v2.80
  9813. *****************************************************************************
  9814. *****           ATTACHED SCREENS UPGRADE (OS 3.0 Required)              *****
  9815. *****************************************************************************
  9816.  
  9817. COMPLAINTS:
  9818. We have received complaints from AES and others about the game using 2
  9819. seperate screens because they typically run lots of programs and flip
  9820. between them a lot so sometimes the screens get out-of-order.
  9821.  
  9822. I have now (finally) dug up the information on attached
  9823. (parent/child/family) screens and OS 3.0 is REALLY AWESOME!!
  9824. OS 3.0 screen handling is vastly superior to OS 2.04!
  9825.  
  9826. SOLUTION: Set up the main lores screen as the parent screen and attach
  9827. the hires screen to it as a child screen.  This method will be used on OS
  9828. 3.0 systems and the original code will be used on OS 2.04 and lower
  9829. systems so the game will still run on all versions of the OS.
  9830.  
  9831. I've been wanting to have LOTS of screens open at once even though I'd only
  9832. be using 2 of them at a time.  But I haven't ever implemented that because
  9833. under OS 2.04 that would just be TOOO annoying to have to press amiga-m/n 5
  9834. times to switch out of Chaos.
  9835.  
  9836. The use of attached screens also allows me to have as many screens open as
  9837. I want without annoying anyone.  All unused screens will be hidden.  This
  9838. is going to be really kewl.
  9839.  
  9840. * IF (OS >= 3.0) THEN OpenAttachedScreens ELSE OpenUnattachedScreens. DONE.
  9841.  
  9842. * Modify MoveScreen() to transparently handle the old and new systems. DONE.
  9843.  
  9844. Ok I just tried it out and this is really AWESOME!  The screens now appear
  9845. as one.  If you drag one screen you drag them both so they can't get out of
  9846. place!  And you can't depth-arrange them wrongly either!  This is exactly
  9847. how I always wanted it to be!  This is a great reason to upgrade to OS 3.0+!
  9848.  
  9849. *****************************************************************************
  9850. *****          END ATTACHED SCREENS UPGRADE (OS 3.0 Required)           *****
  9851. *****************************************************************************
  9852.  
  9853.  
  9854. *****************************************************************************
  9855. *****             WHY CHAOS DOESN'T WORK ON A GRAPHICS CARD             *****
  9856. *****************************************************************************
  9857.  
  9858. The cell highlighting when you press a numeric key uses direct memory
  9859. writes.  Cyberygraphics and Picasso96 do not support this.
  9860.  
  9861. The animated sprite used to highlight the currently active creature uses OS
  9862. routines with no direct manipulation.  Does this work on your gfx card?
  9863. Gfx cards are lame and have 0 or 1 sprites.  The fancy gfx cards which have
  9864. 1 sprite are already using the sprite for the mousepointer so it can't be
  9865. used to highlight a creature.
  9866.  
  9867. The wavy screen effect used for various spells, (most notably vodka), uses
  9868. the copper.  Gfx cards are lame and don't have a copper so this just isn't
  9869. going to work on a gfx card.
  9870.  
  9871. The game uses 2 screens (each in a different resolution and color depth)
  9872. onscreen at once.  I do not think that cybergraphx supports this.  Does
  9873. Picasso 96?
  9874.  
  9875. The game uses color cycling.  Most gfx cards are lame and don't support
  9876. color cycling.
  9877.  
  9878. I would love to make a gfx card compatible version of Chaos which would run
  9879. in 24 bit color with superawesome graphics in 640x480 or higher resolution
  9880. but since I don't _own_ a gfx card and neither does my programming partner
  9881. SAI, it just isn't going to happen until someone buys me a graphics card.
  9882.  
  9883. *****************************************************************************
  9884. *****           END WHY CHAOS DOESN'T WORK ON A GRAPHICS CARD           *****
  9885. *****************************************************************************
  9886.  
  9887. * AGA DETECTION code added.  Now we can display different graphics
  9888.   depending on if the game is running on AGA or ECS.
  9889.   Just use IF (AGA) THEN display aga gfx
  9890.   or       IF (ECS) THEN display ecs gfx
  9891.  
  9892. * SCREWEY QUIT BUG:  Ok, regarding the quit bug that sometimes causes
  9893.   enforcer hits when we quit the game.  I have tracked it down to the
  9894.   following line of code very near the end:
  9895.   IF (HiResWindow) CloseWindow(HiResWindow);
  9896.  
  9897.   I tried adding a HandleIDCMP(DUMP_QUEUE) before that line but it made no
  9898.   difference.
  9899.  
  9900.   Now I have copied the CloseWindowSafely() function from the OS 3.0
  9901.   Includes and Autodocs so the problem is allegedly now fixed.
  9902.   Nope, I played a test game and I still get the exact same enforcer hits.
  9903.  
  9904. * 64 bit alignment of screen memory implemented.  This allows the entire
  9905.   computer to run faster when playing the game on AGA Amigas because the
  9906.   display will be running at 4x bandwidth.
  9907.  
  9908. * DEFAULTS CHANGED to start with 1 human vs 1 computer wizard + 4 generators.
  9909.  
  9910. * SCREWEY QUIT BUG FINALLY SOLVED!!!!
  9911.   Ok, the bug was caused by the fact that when the
  9912.   CloseWindow(HiResWindow); was executed, at that moment the
  9913.   HiResRastPort->Layer was == 0;
  9914.  
  9915.   This could only happen when you played a game then quit it or won and
  9916.   went back to the main screen then quit the game; which explains why it
  9917.   never seemed to happen unless you played a "real game".
  9918.  
  9919.   I had examined this possibility before but there were ONLY 2 lines of
  9920.   code that changed the value of HiResRastPort->Layer.
  9921.   1 line disabled the layers and 1 line reenabled them so I thought it was
  9922.   working 100%.  Unfortunately due to the spaghetti code nature these 2
  9923.   lines were not being executed in pairs.
  9924.  
  9925.   BTW: sometimes this bug would not cause enforcer hits but would instead
  9926.   randomly trash a few memory locations.  This happened to me dozens of times
  9927.   when qutting the game would trash a few bytes of my source code in Cygnus
  9928.   Ed Professional!!
  9929.  
  9930.   This bug took me 20 hours to fix. :(
  9931.  
  9932.   ALL FIXED NOW!
  9933.  
  9934.  
  9935. * BUG: Vodka has no effect on Independents.  NOW FIXED.
  9936.  
  9937. * BUG: Agents cast harmful spells against their friends and allies.
  9938.   Allegedly NOW FIXED.
  9939.  
  9940. * BUG: COMPUTER WIZARDS ALWAYS CAST PLASMABEAM STUPIDLY:
  9941.   NOW FIXED.
  9942.  
  9943. * I also modified the PlasmaBeamHandler and stupidity checking to be
  9944.   compatible with AgentCasting.  DONE.
  9945.  
  9946. * WROTE a new PlasmaBeamRanking() routine so the computer wizards will try
  9947.   to cast it under the most favorable circumstances.
  9948.  
  9949. * FLAW: PlasmaBeamHandler always converts illegal coordinates into a cell
  9950.   with GetCell().  NOW FIXED.
  9951.  
  9952. * NEW ROUTINES for Plasma Beam AI:
  9953.   PlasmaBeamStupidity() to check for a stupid PlasmaBeam cast.
  9954.   PlasmaBeamRanking() to calculate the score for IntelligentComputerSpellSelect()
  9955.   PlasmaBeamDecideWhichDirection() to calculate the best cell to cast
  9956.                                    Plasma Beam on.
  9957.   PlasmaBeamEvaluate() Low level code used by the Ranking and
  9958.                        DecideWhichDirection routines.
  9959.  
  9960. * uhmmm there were major problems in the spellcasting AI...
  9961.   IsStupidCast() was assuming that the spell was being cast from the
  9962.   WIZARD's cell thus it couldn't possibly have worked with AgentCasting.
  9963.   Maybe this explains why agents cast sleep on friendly creatures?  NOW FIXED.
  9964.  
  9965.   PROBLEM: The entire rest of the spellcasting system is always ASSUMING
  9966.   that spells are cast from the cell of the Wizard rather than from wherever
  9967.   they are being cast from.  I don't see how any spells could work properly
  9968.   with AgentCasting except for CAST_FREE spells.  No spell routines take a
  9969.   CasterCell parameter.  They all take a player parameter and just assume the
  9970.   caster is at the wizard's location.  I never play with AgentCasting so
  9971.   I'll just leave this for SAI to fix.
  9972.  
  9973. * MAJOR BUGs in IntelligentComputerSpellSelect() and other routines.
  9974.   The following macros were all defective and returned wrong results when
  9975.   used with magic spells instead of "objects".
  9976.   IsIDundead, IsIDstatic, IsIDmount, IsIDdragon, IsIDgrowth, IsIDinanimate,
  9977.   IsIDmeditation, IsIDarcher, IsIDflying, IsIDshooter, IsIDspecialcombat,
  9978.   IsIDweirdattacker.
  9979.   This was caused by the game not being a real database.
  9980.   The computer ranking of spells  was all messed up because of these bugs.
  9981.   NOW FIXED.
  9982.  
  9983. * MAJOR BUG in IsStupidCast() All CAST_FREE spells were being handled all
  9984.   wrong.  This was totally messing up the computer's thinking.  CAST_FREE
  9985.   spells were routinely being regarded as REALLY_STUPID(-3) when in fact they
  9986.   were the best and most usefull spell possible.  NOW FIXED.
  9987.  
  9988. * Test Plasma Beam.  Give a computer wizard some Plasma Beams and some bless
  9989.   spells and see what he does in various situations.  DONE.
  9990.  
  9991. * ADDED stupidity checking for Alternography.
  9992.  
  9993. * AdjacentCell(cell,number) new predicate which allows us to write loops
  9994.   for handling all cells adjacent to a particular cell 8x smaller.  DONE.
  9995.  
  9996. Developer debug filesize is currently 2002684 bytes
  9997.  
  9998. * REWROTE the following routines using AdjacentCell(cell,number)
  9999.   and saved the following amounts from the 68000 release executable:
  10000.   SpecialCombatHandler()                  saved 1560 bytes
  10001.   All 7 adjacency routines in predicate.c saved 5428 bytes
  10002.   PossibleChoice/ChooseAdjacent           saved  360 bytes
  10003.   GoblinBomb() stuff                      saved  588 bytes 
  10004.                                     TOTAL SAVED 7936 bytes
  10005.  
  10006.   We are  saving an additional 2k for each AI routine, such as
  10007.   PlasmaBeamEvaluate(), that uses the new AdjacentCell() technique.
  10008.  
  10009. * DEVELOPER version now generates 020+ code.
  10010.  
  10011. * ABOVE 2 changes reduced the developer debug filesize to 1983388
  10012.   SAVED 19296 bytes!
  10013.  
  10014. * INCLUDED spellmanager into the archive.
  10015.  
  10016. * ExplorationMode option now on setup screen II.
  10017.  
  10018.  
  10019. **********  MAJOR BUG IN TerminateChaos() *******************************
  10020.  
  10021. BUG: Patrick Hawkins reports: If the talklists file is not present then an
  10022. alert is generated telling you it isn't there.  Then the whole computer
  10023. crashes.
  10024.  
  10025. BUG: Kermit reports: If you don't have narrator.device then an alert is
  10026. generated saying "Could not open narrator.device" then the whole computer
  10027. crashes.
  10028.  
  10029. BUG: James Conwell reports: If ANYTHING goes wrong in CommenceChaos(), a
  10030. file is not found, a library can't be opened, a device is missing, etc.
  10031. then a nice alert is generated telling you such.  Then the entire computer
  10032. ALWAYS crashes.
  10033.  
  10034. ALL FIXED NOW.
  10035.  
  10036. ****************************************************************************
  10037.  
  10038. ****************************************************************************
  10039.                            MEMORY LEAKS
  10040. ****************************************************************************
  10041.  
  10042. BUG:
  10043. 1. Delete the file Devs:narrator.device
  10044. 2. avail flush
  10045. 3. run chaos
  10046. 4. avail flush
  10047. 5. You will now see that you are missing 40 bytes of fastram. :(
  10048.  
  10049. BUG:
  10050. 1. Put the narrator.device file back into devs:
  10051. 2. avail flush
  10052. 3. run chaos
  10053. 4. quit the game on the main setup screen
  10054. 5. avail flush
  10055. 6. You will now see that you are missing 192 bytes of fastram. :(
  10056.  
  10057. BUG:
  10058. 1. Run the game.
  10059. 2. Quit the game.
  10060. 3. You will now see that you are missing 240 bytes of fastram. :(
  10061.  
  10062. ALL THESE leaks are fixed months later in March, 2000 by JC.
  10063. *****************************************************************************
  10064.                          END MEMORY LEAKS
  10065. *****************************************************************************
  10066.  
  10067.  
  10068. **************************************************************************
  10069. *****                    SEMAPHORE BUGS!                             *****
  10070. **************************************************************************
  10071.  
  10072. Anything that changes cellp->id or the Exploration status of
  10073. a cell or the global PlayerView MUST be done while holding
  10074. the semaphore!  Else bad things can (and eventually will) happen!
  10075.  
  10076. Also, anything that changes or READS the value of cellp->flag MUST be done
  10077. with a lock on the board semaphore!
  10078.  
  10079. Otherwise, occassionaly, the variables will exist in a state of
  10080. incongruency.  This could trigger extremely rare, totally unreproducable,
  10081. horrible bugs.  This one concept might explain ALL of the bizarre
  10082. unreproducable bugs that we've ever had in the past.
  10083.  
  10084. * FIXED in core.c: ChangePlayerView(); ClearVisible(); PutToSleep(); WakeUp();
  10085.   RestoreCell(); BackUp(); BackUpWizard(); RestoreCellWizard();
  10086.   ExploreCell(); CompletelyRecalculateTeamExplore();
  10087.   EVERYTHING IN core.c ALLEGEDLY NOW FIXED.
  10088.  
  10089. * FIXED in chaos.c: CalculateArtifactOwners();
  10090. * FIXED in init.c:  InitialisePlayers();
  10091. * FIXED in io.c:    SaveGame(), LoadGame();
  10092. * FIXED in move.c:  Combat();
  10093. * FIXED spells:     No spells needed changing.
  10094.  
  10095. Ok, that takes care of all the occurrences of .flag and ->flag and .id and
  10096. ->id.  Now I must search for all forms of code such as:
  10097. board[cell]=board[c]
  10098. board[newcell] = board[oldcell]
  10099. etc. etc. ad infintum.
  10100.  
  10101. * FIXED spells: hyperclone, replicate, alliance, separation
  10102. * FIXED init.c: initialise_players()
  10103. * FIXED io.c:   LoadGame()
  10104. * FIXED warp.c: WarpOut()
  10105.  
  10106. Ok, AFAIK all code which needs a semaphore lock now has it.
  10107.  
  10108. The game SHOULD be 100% rock solid now.
  10109. **************************************************************************
  10110. *****                   END SEMAPHORE BUGS!                          *****
  10111. **************************************************************************
  10112.  
  10113. * PROBLEM: Casting Stone to Flesh or Inanimorphobiosis on a wall gives you
  10114.   a wall which can be moved but it can't actually attack anything.  I changed
  10115.   it so that it will always be able to attack the living and if the inanimate
  10116.   object was undead then it will also be able to attack undeads. NOW FIXED.
  10117.  
  10118. Since I have now implemented AI for Plasma Beam, this allows me to
  10119. implement similar AI for a whole range of new beam spells.
  10120.  
  10121. * 11 NEW SPELLS: Brain Drain Beam, Demonic Touch Beam, Combat Drain Beam,
  10122.   Range Drain Beam, Recover Drain Beam, Lethargy Beam, Paralyzation Beam,
  10123.   Life Drain Beam, Toxicity Beam, Encumberance Beam, Sluggishness Beam.
  10124.   These spells do not affect corpses or scrolls.  Each spell has its own AI
  10125.   routine.
  10126.  
  10127. * MODIFIED the above spells + PlasmaBeam to do the WHITECIRCLEIM instead of the
  10128.   WHITECIRCLEEX effect in order to keep in tune with my "WHITECIRCLEIM=BAD,
  10129.   WHITECIRCLEEX=GOOD" concept. Also made them do the cool EXPLODE effect if
  10130.   it kills a target.  Also put in a delay when a creature is killed by a
  10131.   beam so that your eye can clearly follow the action and see which creature
  10132.   was killed.
  10133.  
  10134.  
  10135. I cast Toxicity Beam on an enemy wizard so that all his recovery stats are
  10136. -1 yet his Combat and Maneuverability are NOT going down to 0 like they are
  10137. supposed to.
  10138.  
  10139. * BUG! Combat, Maneuverability, Ranged Combat and Special Combat
  10140.   recovery/poisoning don't work right!!!   NOW FIXED.
  10141.  
  10142. * The holder of the Sword of Sassenrath makes his nearby friends more
  10143.   intelligent.  DONE.
  10144.  
  10145.  
  10146. * PROBLEM: cutting and pasting a wizard in the level editor doesn't
  10147.   "unexplore" the cells that he has already mapped out.
  10148.   How do we fix this???
  10149.  
  10150.   We need an option in the editor to RESET EXPLORATION BITS
  10151.   this will 0 out all exploration bits and then call ExploreCell(cell) on
  10152.   EVERY cell.  The board will then be properly mapped out.  NOW FIXED.
  10153.  
  10154.   You should use the menu option "ResetExplorationBits" right before you
  10155.   save the final version of your level.  If you don't use this menu option
  10156.   then there may be various creatures who are standing in unexplored space.
  10157.   Use this menu option as often as you like.  It doesn't hurt anything.
  10158.  
  10159.   A side effect of this is that SAI's most recent level is now much harder
  10160.   because there are Independent walls everywhere.  Previously these walls
  10161.   existed in unexplored space and so did most of the board, so the Emerald
  10162.   Dragon Brigade couldn't see you to shoot at you.
  10163.  
  10164.   Using this new menu option means that all the Independent walls all over
  10165.   the board will explore the space around them, meaning they can see pretty
  10166.   much the entire world.  This means the Independent archers can shoot at you
  10167.   long before you can see them.  Ditto for Independent dragons, etc.
  10168.  
  10169.   I assume this is ok with you.  If not then let me know and we can work
  10170.   something out.
  10171.  
  10172.   For example if you want to make a level where the independents can't see
  10173.   everything then you can just make all your passageways be composed of walls
  10174.   belonging to a nonexistent player or even to NOBODY.
  10175.   
  10176. ****************************************************************************
  10177.                       Codex Sirconia Upgrade
  10178. ****************************************************************************
  10179.  
  10180. * Several small corrections made.
  10181.  
  10182. * Problem: There is no explanation of Summoning, only of Subjugation.
  10183.   7 new paragraphs added.  NOW FIXED.
  10184.  
  10185. * Problem: There is no explanation of how the world can exist in a
  10186.   2-dimensional state and yet flying creatures can "fly" "over" other
  10187.   objects.  2 paragraphs added. NOW FIXED.
  10188.  
  10189. Still need to come up with some sort of explanation for undeads and why
  10190. they can't be attacked.  ???
  10191.  
  10192. * Added 1 more paragraph.
  10193.  
  10194. * NEW SECTION: "The Folly of Man" to explain generators.  10 paragraphs.
  10195.  
  10196. ****************************************************************************
  10197.                     END Codex Sirconia Upgrade
  10198. ****************************************************************************
  10199.  
  10200.  
  10201. ****************************************************************************
  10202.                        PassRMB(window) BUG
  10203. ****************************************************************************
  10204.  
  10205. * BUG: I was player 1 and I clicked my archer immediately then immediately
  10206.   clicked the RMB while it was still saying "wood elf" and things got messed
  10207.   up.  I couldn't move or cancel his move.  I had to hit the end turn gadget
  10208.   to be able to shoot and continue.
  10209.   OK, I put in some code to PassRMB; GetSpellSelection(); TrapRMB; so now the
  10210.   entire game should be running with TrapRMB except for the spell-selection
  10211.   phase.  ALLEGEDLY NOW FIXED.
  10212.  
  10213.   However there is probably still a weird bug because for some reason
  10214.   the HandleIDCMP() does a PassRMB depending on what type of cell return is
  10215.   requested.  I don't think that is right.
  10216.  
  10217.   Ok I just played a test game and I was able to click on my wood elf and
  10218.   bring up the menus every single time!  I was able to do the "about" menu
  10219.   and "new game" menu and "scores" from within the movement phase!!!!
  10220.   And each time I did it, it messed up the movement of my wood elf.
  10221.   Something somewhere is doing a PassRMB that isn't supposed to.
  10222.  
  10223.   Ok I have now removed all occurences of PassRMB() from HandleIDCMP()
  10224.   and the bug is REALLY NOW FIXED.
  10225.  
  10226.   If those commented out PassRMB()s mess something up then let me know.
  10227.   (I don't forsee any problems)
  10228.  
  10229. ****************************************************************************
  10230.                      END PassRMB(window) BUG
  10231. ****************************************************************************
  10232.  
  10233. * Installed Deluxe Paint 5.  + Cracked Gold font + Earth Yellow font
  10234.   (looks good in a comical/cartoony sort of way)
  10235.  
  10236. * Put in all of SAI's new spell graphics into the game.
  10237.  
  10238. November 25th, 1999:
  10239.   INSTALLED Chaos 2.70 on JJ's Amiga 3000.
  10240.   SENT Chaos 2.70 to SAI for use in level-designing etc.
  10241.  
  10242.  
  10243.  
  10244. December 4th, 1999:
  10245. * ENFORCER HITS if either of the screens or windows fails to open then
  10246.   enforcer hits are generated by TerminateChaos(); NOW FIXED.
  10247.  
  10248. December 6th, 1999:
  10249. * MAJOR RMB BUG FOUND.  You can access the menus from within the movement
  10250.   phase with disastrous results.  Furthermore you can't cancel your
  10251.   spellcasts with the RMB thus the game locks up when you cast a spell but
  10252.   have no legal targets. I found this while playtesting my 3rd level, I had
  10253.   just got a Summons spell as a bonus spell for killing a ShapeChanger, so I
  10254.   was going to _finally_ be able to win.  I had 7 open squares adjacent to my
  10255.   wizard so I cast it immediately.  I cast 7 good creatures and then I
  10256.   couldn't cancel the 8th one!  So the game was STUCK!  ARRRGH!  NOW FIXED.
  10257.  
  10258. December 10th, 1999: JJ is complaining about his ally's growths growing
  10259. over his creatures.  And he isn't allowed to attack the growth and kill it
  10260. since its his ally.  SAI never stated an opinion on this matter so I am
  10261. hereby making a
  10262.  
  10263. * NEW RULE: The growths of your allies do not grow over your creatures.
  10264.   Except for Fire and Flood which still attack EVERYONE as usual.
  10265.   NOW FIXED.
  10266.  
  10267. * Recompiled and redelivered v2.71 for JJ.
  10268.  
  10269. * Chaos v2.71 FINALIZED.  This is the final OS 1.2 / 1.3 / 2.04 compatible
  10270.   version of Chaos.  All future versions require OS 3.0 or higher.
  10271.  
  10272. ****************************************************************************
  10273.                       Information Screens Upgrade
  10274. ****************************************************************************
  10275.  
  10276. For the next upgrade I will be doing fancy screen manipulation in order to
  10277. achieve smooth scrolling AND to be able to utilize a wide range of
  10278. different screens which will all use the exact same chunk of memory.
  10279.  
  10280. This will allow the game to use a minimum amount of chipram and avoid memory
  10281. fragmentation from constantly opening and closing screens.
  10282.  
  10283. Using clever arrangement of the screen memory, we will be able to display
  10284. e.g. 3 screens at once which will trash the display of all the other
  10285. screens, but as those other screens won't be visible, noone will ever know.
  10286. When switching back to the original display, the previous 3 screen display
  10287. will be trashed, but as it will no longer be visible, nobody will ever
  10288. know.
  10289.  
  10290. Using this technique we can have a dozen different screens open at once,
  10291. all using overlapping chipram.  It will simply be a matter of pushing the
  10292. correct screens to the front and using them to generate the proper display.
  10293.  
  10294. In order for this technique to work, the screens must be in interleaved
  10295. format because interleaved format utilizes memory more efficiently.
  10296.  
  10297. Also, interleaved screens allow general blitter operations to be faster so
  10298. hopefully all those DrawImage() calls will be a bit faster.
  10299.  
  10300.  
  10301. Pointers:
  10302.  
  10303. -------------------------------------------------------------------------
  10304. Display1: NormalDisplay 320x256x6 main screen + 640x256x3 hires screen.
  10305.                         61440 bytes           + 61440 bytes = 122880 bytes total
  10306.  
  10307. Base=HiResScreen
  10308. Base+ 61440 LoResScreen. (main map)
  10309. -------------------------------------------------------------------------
  10310.  
  10311. Display2: ScrollPanel1Display: 640x1024x4 autoscroll screen + 320x32x6 screen to display the icon.
  10312.                                327680 bytes                 + 7680 bytes = 335360 bytes.
  10313.  
  10314. Base+7680=SP1SmallLoResScreen (320x32x6) (7680 bytes)
  10315. Base+7680+7680=SP1HiResAutoScrollScreen(640x1024x4) (327680 bytes)
  10316. -------------------------------------------------------------------------
  10317.  
  10318. Create various other displays here...
  10319.  
  10320.  
  10321.  
  10322. Base+7680 = LoresScreen on standard info panel.
  10323. Base+7680+whatever = HiResScreen on standard info panel.
  10324. Base+7680+whatever+whatever= HiResScrollingScreen on standard info panel.
  10325.  
  10326.  
  10327.  
  10328. * 1: Change all screens to Interleaved.  Make neccessary JC-code
  10329.      adjustments to open and setup the screens in interleaved mode. DONE.
  10330. * 2: Change lores screen to be 64 colors and the shadowboard too.  This
  10331.      prepares for the final and ultimate ECS version.  DONE.  Hmmm.. the
  10332.      quadrascopes are now slower.
  10333. * 3: Adjust asm testpixel code to work with interleaved bitmaps and 64 colors.
  10334.      TestPixel4_320 is now TestPixel5_320 and it only works on Interleaved BitMaps
  10335.      with 6 bitplanes.
  10336.      TestPixel1_320 now only works on Interleaved Bitmaps of 6 bitplanes.
  10337.      ALL DONE.
  10338.  
  10339.      YIKERS!  64 color mode drains so much DMA time from the chipram that
  10340.      now if you move the mouse on the New Game? or End Turn? screens the gfx
  10341.      slow down dramatically!   Perhaps these should be redone on 32 color
  10342.      screens for speed?
  10343.  
  10344. * 4: Adjust asm DoTheHighlighting and UnDoTheHighlighting to work with the
  10345.      new 64 color interleaved screens.  DONE.
  10346.  
  10347.      WOW!  Pressing "l" for line of sight still goes at a nice fast speed
  10348.      even though it is testing an extra bitplane now and even though the
  10349.      available bandwidth for testing chipram has been cut in half.
  10350.  
  10351. * 5: 64-bit aligned the double-buffering of the rotating pentagrams. DONE.
  10352.  
  10353. * 6: REMOVED all that conditional OS 1.2 / 1.3 code from info.c.
  10354.  
  10355. Display3: ScrollPanel2Display: same old way for now.
  10356.  
  10357. Display4: FileRequesterScreen. Noninterleaved.  For Loading and Saving.
  10358.  
  10359. * 7: Allocate the screenmem as 1 big chunk then subdivide it in an
  10360.      overlapping manner for the various displays and screens.
  10361.      A. Allocate 1 chunk of 343040+4 bytes of chipram. (This is the largest
  10362.         chunk currently needed) 640x1024x4 + 7680+7680 DONE.
  10363.      B. Setup the bitmap pointers appropriately. DONE.
  10364.      C. Open up the 2 new screens.  Put the 2 new ones in back for now. DONE
  10365.      D. Open the appropriate window on each screen. DONE.
  10366.  
  10367. * 8. Install TypeSmith 2.5b.  DONE.
  10368.      Ok, TypeSmith is really awesome because it can load and edit
  10369.      PostScript, Compugraphic, TrueType and Amiga Bitmap fonts!
  10370.      However, there is no way to see how the chars will actually look in
  10371.      their normal size while you are editing them so I had to use Deluxe Paint 5
  10372.      and keep switching screens back and forth.  It worked ok.  It is clear
  10373.      that TypeSmith was designed to edit scalable fonts rather than bitmap
  10374.      fonts.  I needed a break from programming so I stayed up all night
  10375.      designing a bitmap script font that looks really GREAT!
  10376.  
  10377.      Unbelievably, there is no way to change the width of a bitmap
  10378.      character from within TypeSmith so I wrote my very first Arexx program!
  10379.      WOW!  Arexx is totally kewl!  The Arexx port on TypeSmith is very
  10380.      nice.  I made a script in 8 minutes (including the time to look up the
  10381.      commands in the online help) that allows me to change the width of chars.
  10382.      It even worked perfectly on the first try!
  10383.  
  10384.      I was going to make the ChaosCalligraphy font be 44 points tall for use
  10385.      on the scroll info panels.  This looks AMAZINGLY FANTABULOUS, but then
  10386.      I realized this would be too big for use on the standard info panels so I
  10387.      squished it down to 40 points so now it could theoretically be used on
  10388.      the standard info panels also.  The 40 point font doesn't look as awesome
  10389.      as 44 but it still looks ok.
  10390.  
  10391. * 9. Design Awesome Calligraphy Font: ChaosCalligraphy.font/40  9356 bytes DONE.
  10392.  
  10393. *10. Implement new ScrollDisplayPanel1
  10394.      A. Correctly position the screens and print text to them using the
  10395.         same old font as always in order to test the AUTOSCROLLing.
  10396.  
  10397.         Ok, I have now wasted quite a few hours trying to get AUTOSCROLLing
  10398.         to work.  The docs don't fully explain it.  I finally figured it out
  10399.         after much trial and error.  I now know how AUTOSCROLL works
  10400.         HOWEVER it is useless on a child screen because the scrolling is
  10401.         somehow constrained by the parent screen!  Grrr.. I consider this
  10402.         to be a bug in the OS.
  10403.  
  10404.         AUTOSCROLLING isn't really required.  But opening a LARGE screen
  10405.         which can be manually scrolled IS required.  In each test where
  10406.         AUTOSCROLLING failed, manual scrolling failed also.
  10407.  
  10408.         So here are my options for making the AUTOSCROLL
  10409.         ScrollInformationPanel work:
  10410.  
  10411.         1) Don't attach it to the parent screen.  Then it works.  The
  10412.            trouble is then there are 2 open screens in the system and that
  10413.            annoys people.
  10414.  
  10415.         2) Do #1 but build in some amiga-m/n detection code into Chaos so
  10416.            that we automatically depth arranged BOTH screens at once.  The
  10417.            trouble with this idea is #1: I don't know how to do it and #2
  10418.            I doubt if it would even work.
  10419.  
  10420.         3) Try to open the parent screen with fake higher top so that it
  10421.            can move up higher.  Thus the child screen will also be able to
  10422.            move higher.  The trouble with this idea is I don't think you can
  10423.            just go  around opening screens with fake tops.  I would try this
  10424.            idea except for 1 MAJOR problem: when the parent screen becomes
  10425.            AUTOSCROLL in the future, having a fake top means it will AUTOSCROLL
  10426.            incorrectly! grrr.
  10427.  
  10428.         4) Figure out some way to poke into the screen->viewport or
  10429.            whatever and force this to work by making it not be a child
  10430.            screen anymore or by changing the clip in the viewport or something??
  10431.            I TRIED THIS AND IT DIDN'T WORK. 8(
  10432.  
  10433.         5) Make the SP1HiResAutoScrollScreen be the parent screen.  If its
  10434.            the parent it should be able to AUTOSCROLL.  The problem with
  10435.            this is that I don't think it will work because all the other
  10436.            child nondraggable screens will constrain it from scrolling off
  10437.            the top.
  10438.  
  10439.         6) Constantly keep reopening and closing the scroll screens.
  10440.            It takes 25 frames (half a second) to open the 640x1024x4 screen
  10441.            and window.  It takes 34 frames to open that screen/window + the
  10442.            SmallLoRes Screen and Window.  This is entirely too long to wait.
  10443.  
  10444.         7) Open 2 child screens of 640x512 each and flip between them when
  10445.            moving the mouse or pressing an arrow key.
  10446.  
  10447.         8) Somehow use ScrollVPort() to do the scrolling on the 640x1024
  10448.            child screen.  The problem with this is that experience has
  10449.            shown ScrollVPort to NOT BE FAST ENOUGH.  AUTOSCROLL is
  10450.            PERFECTLY smooth and so is MoveScreen() but ScrollVPort() is
  10451.            screwed up.
  10452.  
  10453.         9) Temporarily make SP1HiResAutoScrollScreen be the parent screen.
  10454.            This should allow it to autoscroll correctly.  Then later on
  10455.            when the map becomes an AUTOSCROLL screen and the 2 screens
  10456.            conflict with each other, I'll just make the 2 SP1 screens into
  10457.            their own separate family.  Thus there will then be 2 open
  10458.            screens in the system at that point.
  10459.            This might also necessitate making the HiResScreen be DRAGGABLE
  10460.            again.  Hmmm...
  10461.            DONE.
  10462.  
  10463. * NEW FUNCTION: RedrawRightHandSide() to redraw whatever needs to be
  10464.   redrawn on the right hand side of the map screen. (spell list or gadgets or
  10465.   whatever.  DONE.
  10466.  
  10467.      B. Adjust colors.  DONE.
  10468.      C. Implement Stefan Burstroem's FastTextFit.asm into the makefile.
  10469.         The only problem is there are no docs for the routine!
  10470.         I eliminated the TextExtent parameter since it was not used. DONE.
  10471.  
  10472. * BUG: the FastTextFit asm code has a bug so that it usually returns 1
  10473.        higher than the correct result.  NOW FIXED.
  10474.  
  10475.      D. Implement new 40 pt. calligraphy font on the new Scroll Info Panel.
  10476.         DONE.
  10477.      E. Rewrite the PRTPool() function so that the entire text is
  10478.         decompressed all at once into a buffer then that buffer must be processed
  10479.         using FastTextFit() to fit the text onto the screen 1 line at a time.
  10480.         I ended up completely rewriting printer.c.   DONE.
  10481.      F. I had to change PRT_WIDTH to be 1025  DONE.
  10482.      G. Since I am rewriting printer.c I have converted it to JC.  DONE.
  10483.  
  10484. * BUG! My pearl.font TextAttr was using FPB_DISKFONT instead of the correct
  10485.   FPF_DISKFONT!  This explains why the pearl.font never worked on my OS 1.3
  10486.   Amiga 2000 and why it never seemed to work on my dad's A500 or A3000.
  10487.   Using FPB_DISKFONT is equivalent to FPF_ROMFONT so it APPEARED to work on
  10488.   my computer because my preferences are set to use pearl.font as the default
  10489.   system font.  This means that NOBODY has been seeing the correct font all
  10490.   this time except for me!  ARRRGGHH!!!   NOW FIXED.
  10491.  
  10492. * December 16th: First panel of the new scroll display is finally ALL DONE.
  10493.   Most spell descriptions fit onto 1 screen with the small 40 point font so
  10494.   the AUTOSCROLLing is not usually used.
  10495.  
  10496. *11. Implement new ScrollDisplayPanel2
  10497.      Hmmm.... How should I do this?
  10498.      A. Have another screen which is only 640x512 and display the info on
  10499.         that screen?
  10500.      B. Simply erase the autoscroll screen and display the data on it?
  10501.      C. Simply erase the bottom half of the autoscroll screen and display
  10502.         the data on the bottom half and smooth scroll it up?
  10503.      ARRGH I can never decide how to do these things!
  10504.  
  10505.      I guess I'll just do option A.  DONE.
  10506.  
  10507. * Utilized some trickery to stop the ScrollPanel1 from scrolling when there
  10508.   is only 1 screen of text.  DONE.
  10509.  
  10510. * Implement Anti-Aliased, Anti-Flicker text.  Technically this is
  10511.   anti-flicker text, but it also partially antialiases too.  DONE.
  10512.  
  10513. * TOO SLOW: On my 25 Mhz 68030 it takes 65 frames to bring up the description
  10514.   of the Cobra.  I added in some Mask stuff and rearranged the colors but it
  10515.   still takes 44 frames.  It takes 5 frames to decompress the text, the
  10516.   other 39 frames are displaying the text in the dead slowest graphics mode
  10517.   of ECS.
  10518.  
  10519.   If anyone complains about it being to slow I can do one or more of the
  10520.   following:
  10521.   Use the fake 1 bitplane screen.
  10522.   Add an extra pixel between lines and use the BltBitMap() technique.
  10523.   Change to noninterleaved and write an asm routine to zap the text up real
  10524.   fast.
  10525.   Switch down to 8 colors?
  10526.   Design the font as a colorfont.
  10527.   Design the font as 2 fonts.  1 is the normal font an the other is just
  10528.   the antialiasing.
  10529.   Try a minterm of 0x77 or 0xEE
  10530.  
  10531.   I at least need to do the fake screen thing between SP1 and SP2 to cover
  10532.   up the sloppiness + speed it up greatly!
  10533.  
  10534. * IMPLEMENTED: fake 1bpl screen at beginning of SP1 and again between SP1 and
  10535.   SP2.  Damn it still takes 21 frames for the Cobra description.  35 frames
  10536.   for gooey blob!
  10537.  
  10538. * DISABLED CLIPPING: during the text printing only.  NO EFFECT.  8(
  10539.  
  10540. * Tried JAM2 mode: NO EFFECT. 8(
  10541.  
  10542.   I could do this:  Text() the text to a seperate bitmap buffer.
  10543.   
  10544.   move.l (bitmapbuffer)+,d0
  10545.   move.l  d0, (FastRamBufferbpl1Y+1)+
  10546.   or.l    d0, (FastRamBufferbplY-1)+
  10547.   That simple loop will generate the antialiasing.
  10548.  
  10549.   move.l d0,(FastRamBufferbpl2Y)+ ; to copy the main text also.
  10550.  
  10551.   Then just copy the bitplanes to the appropriate planes of the screen and
  10552.   that is all.  Maybe I'll do something like this someday.  But I'll
  10553.   probably never get around to it.  It doesn't apply to gfx cards.
  10554.  
  10555. * NEW POWERUPS shown on Info Screen: Crystal Ball, Ubiquiscope, Seismology,
  10556.   Cartography, Telescope, Alternography, Fly, Earthbind, Archery,
  10557.   Nonarchery, Lich/Convert/Materialize/Undead/NotUndead, Sword of Sassenrath,
  10558.   Mount, NoMount, NoGrow, StoneToFlesh, Inanimorphobiosis, FleshToStone.
  10559.  
  10560.   I intentionally left out Cursed Sword because its graphic currently looks
  10561.   identical to a regular Magic Sword.
  10562.  
  10563. * PROBLEM: If the game locks up we can't just press CTRL-C to break into
  10564.   the program.  I have now set it so CTRL-C will work in the developer
  10565.   version.  DONE.  hmmm... doesn't seem to have any effect.
  10566.  
  10567.  
  10568. *12. Implement new InfoPanelDisplay1  IF -i option (InterlaceMode) is set have
  10569.      it in interlace else have it in non interlace, the old way.
  10570.  
  10571.      In other words leave the existing info panel 1 code intact.  Just add
  10572.      in an IF (InterlaceMode) InformationPanelInterlace(); return;
  10573.      InformationPanelInterlace() will call the InformationPanelInterlace1();
  10574.      A. Open 2 new interlace screens with windows.  DONE.
  10575.  
  10576. *13. Implement new InfoPanelDisplay2 DONE.
  10577.     
  10578. *14. Implement Antialiased text on the new IP1 displays DONE.
  10579.      (this requires a minimum of 16 colors)
  10580.  
  10581. *15. Implement antialiased bargraph boxes to reduce flicker on 1084S monitors.
  10582.      DONE.
  10583.  
  10584. *16. Implement color cycling on the new IP1 displays.  Oops color clash.
  10585.      The original color cycling worked by cycling HIRESGREEN2, but this
  10586.      color is being used to display the owner.  Ok I will use HALFHIRESBLACK
  10587.      and HALFHIRESGREEN1 for the color cycling colors.
  10588.  
  10589.      Or I might create yet another screen so that the creature name + owner
  10590.      can have its own 16 color pallette on ECS.  Or its own 256 color pallette
  10591.      or whatever on AGA.
  10592.  
  10593.      COLOR CYCLING DONE.
  10594.  
  10595. *17. Redo the halfIP1HiResColors to be halfway between the new darkblue
  10596.      background and the real color to reduce flicker.  DONE.
  10597.  
  10598. * PROBLEM: the cyan rectangular boxes flicker quite badly on a 1084S
  10599.   monitor even when antialiased.  Solution: draw the rectangles in a darker
  10600.   color.  DONE, but it strangely doesn't seem to reduce the flicker any.
  10601.   Its very difficult to keep long narrow horizontal lines from flickering
  10602.   in interlace.
  10603.  
  10604. *18. ReImplement Level Editor into the new IP1 displays. DONE.
  10605.  
  10606. * There is a hashing problem.  I need to make it so that when scrollpanel
  10607.   exits, clear the whole sp1 display instead of just the map display. DONE.
  10608.  
  10609. *19. Fix level editing the rest of the way.  Level editor is finally
  10610.      working again on Jan. 12, 2000.
  10611.  
  10612.  
  10613. ***************************
  10614. *** IP1 Speedup Upgrade ***
  10615. ***************************
  10616.  
  10617. Time to completely display IP1 info panel on 25Mhz 030 A3000:
  10618. IP1 display currently takes:       51 frames. A bit over 1 second.
  10619. Implement FakeBlueScreen Trick:    30 frames.
  10620. Just for fun I commented out
  10621. SetRast (IP1HiResRastPort, BLACK); 23 frames.  Indicating it takes 7 frames
  10622. to do SetRast while a 64-color lores screen is being displayed.
  10623. Commented out
  10624. RectFill(pr,0,0,320,65);           22 frames. Indicating it takes almost 1
  10625. frame just to do that in 64 color mode.
  10626.  
  10627. Ok now I'm timing how long it takes to do the rectfill + setrast while
  10628. in lores 1 bitplane mode (by pushing fake1bplscreen to front)
  10629.                                    27 frames.
  10630.                                    25 frames on nothing/nobody.
  10631.                                    19 frames by #ifndefing out the current and max numbers.
  10632.  
  10633. Implement CopyMemQuick Trick: should be 9 or 10  frames.
  10634.                                    15 frames.
  10635.                                    14 frames on nothing/nobody.
  10636. Eliminated 2 ScreenDepth() calls   14 frames.
  10637.                                    13 frames on nothing/nobody.
  10638.  
  10639. * Optimize PutScreen() to not move the screen if it is already in the correct
  10640.   position. DONE.  This effectively eliminates 2 PutScreen Calls.
  10641.  
  10642.                                    12 frames on nothing/nobody.
  10643.  
  10644. * Change all the colors from HiResYellow to IP1HiResYellow etc. DONE.
  10645.  
  10646. * Make HalfHiResYellow be color 1.  Mask = 1 when writing the antialias color.
  10647.   Make HiResyellow be color 9. Mask = 9 when writing the HiResYellow.
  10648.   Should double the speed of number printing from 6 frames to 3 frames.
  10649.   So I am just switching the positions of IP1HiResYellow<->IP1HiResGreen1
  10650.   DONE.
  10651.                                     10 frames on nothing/nobody.
  10652.   TOTAL SPEED INCREASE:  5.1x
  10653.  
  10654. ******************************
  10655. *** END IP1 Speedup Ugrade ***
  10656. ******************************
  10657.  
  10658. * Make the small IP1SmallLoResScreen be really small in the OpenScreen()
  10659.   command.  This will fix that lame glitchiness permanently!
  10660.   DONE.
  10661.   Ok, the glitchiness is fixed but now the mouse pointer teleports in order
  10662.   to stay within the bounds of the small screen.  This is very annoying.
  10663.   So my options now are:
  10664.   A: Revert IP1SmallLoResScreen to be a full 512 pixels high and suffer
  10665.      with a glitchy display (the glitch is only displayed for 1 frame)
  10666.   B: Do option A + install a UserCopperList to set all colors to the
  10667.      background color.  This would fix the glitch.  But I have no idea how
  10668.      to install such a UserCopperList.
  10669.   C: Keep the screen small and just keep track of the mouse position and
  10670.      restore it.  This should work but will cause a "mouse-pointer glitch".
  10671.      There is no easy way to do this.  I'll hafta hack some code in to make
  10672.      this work.  Special thanx to Kalsu for supplying me some example code for
  10673.      this.  This is the option I will attempt.
  10674.   D: Leave the small screen small and make the big screen be 512 pixels.
  10675.      Put the big screen at the top of the display and the small one at the
  10676.      bottom.  This would solve all the problems.  But then we would have
  10677.      the pic of the creature and the powerups and kills at the bottom of the
  10678.      screen. This is the easiest way to fix it. How do you feel about this?
  10679.   E: Try setting BORDERSPRITES to see if that fixes things.
  10680.      I really don't want the mousepointer going into the side borders.  I
  10681.      only want it to go into the bottom border area.  But there is no way to
  10682.      specify this so I'm not going to try this option.
  10683.  
  10684. * Implement Option C by making a function MoveMousePointer(x,y) DONE
  10685.  
  10686.   It basically works but the mousepointer flickers and jerks because its
  10687.   being moved around.  So I'm now going to try Option
  10688.  
  10689. * F: Make the IP1LoResScreen be the full 512 pixels high but in order
  10690.      to prevent glitchiness I'll set its color palette so that all 64 colors =
  10691.      the background color until the screens are all properly arranged.  Then
  10692.      I'll reload the pallette back to its normal setting.
  10693.      DONE.  WORKS GREAT.  NO NOTICEABLE SLOWDOWN.  NO MORE GLITCHES.
  10694.  
  10695.  
  10696. *20. Reduce size of IP1HiResScreen and BitMap and Window down from 512 to 443
  10697.     (the exact right number) to speed things up.  DONE.
  10698.     The IP1 and IP2 displays are now exactly 512 pixels in height.  This
  10699.     noticeably increases chipram bandwidth since it has eliminated around 16
  10700.     pixels of vertical overscan.
  10701.  
  10702. *21. Snapshot the base IP1 displays using straight 32-bit CopyMemQuick and
  10703.      copy them in for vast speed improvement.
  10704.      A. Add in some #ifdef code to cause the numbers and the name and owner
  10705.          to not be printed. DONE.
  10706.      B. Simply save the memory of the IP1HiResScreen straight to a diskfile
  10707.         Screens/IP1HiResScreenMem. 142080 byte file. DONE.
  10708.         If I ever do the 2nd screen it can be IP2HiResScreenMem.
  10709.      C. Modify start.c to load in the new Screens/IP1HiResScreenMem file. DONE.
  10710.      D. Modify info.c to copy the image to the screen instead of using
  10711.         all those timeconsuming AntiAliasWriteText() calls.
  10712.         Copy IP1HiResBaseDisplay to IP1HiResScreenMem. DONE.
  10713.  
  10714. * Save mouse coords for SP1 screens. DONE
  10715.  
  10716. * BUG: Promote() messes up the semaphore when performed on an exposed wizard.
  10717.   NOW FIXED.
  10718.  
  10719. * BUG: Promote() on a scroll can cause enforcer hits. NOW FIXED.
  10720. * BUG: Graphics of kills on IP2 screen are messed up.  NOW FIXED.
  10721. * BUG: Range is being printed over movement on IP1 screen.  NOW FIXED.
  10722. * BUG: Can't be Smelled/heard/seen is in wrong color and wrong position. FIXED.
  10723. * BUG: Unexplored Region / Cloaked not erasing IP1 screen.  FIXED.
  10724.  
  10725.   FLAW: The filerequester uses routines optimized to smoothly scroll on
  10726.   NONinterleaved screens.
  10727.   SOLUTION: Simply make the HiResScreen NOT be interleaved.
  10728.   When I did this the colors got all messed up on the HiResScreen!  I have
  10729.   no idea what is going on.  So I'm leaving the screen as Interleaved for the
  10730.   time being.
  10731.  
  10732.   Fix bottom screen glitch.  DONE.
  10733.  
  10734. * Fix screen dragging.  Make all screens be nondraggable except for the SP1
  10735.   screen I suppose.  DONE.
  10736.  *1. Simply put the SP1HiResAutoScrollScreen back to x,-512 every time you
  10737.      exit the scroll panel.  This will prevent the hiresscreen from moving up
  10738.      and revealing garbage. DONE.
  10739.  *2. Try making the main map screen (screen) be nondraggable also. DONE.
  10740.  *3. Try making the fake1bitplanescreen be nondraggable. DONE.
  10741.  *4. Put the SP2 panel into the correct position with PutScreen(). DONE.
  10742.  
  10743. ****************************************************************************
  10744.              January 28, 2000  END Information Screens Upgrade
  10745. ****************************************************************************
  10746.  
  10747. JJ Bug Report for v2.71: ===================================================
  10748. * BUG: Promote() doesn't work right.  His Undead Green Dragon: turned into
  10749.   a living Emerald Dragon.  Ok I completely revamped Promote() to
  10750.   intelligently promote every stat.  NOW FIXED.
  10751.  
  10752. * BUG in Exploration Mode:
  10753.   Jason cast Moveit but when he got his extra move he couldn't see
  10754.   anything!  However if he clicked on an "unmapped" square he could still
  10755.   move his units.  NOW FIXED.
  10756.  
  10757. Recompiled v2.71 into v2.72 and reinstalled on his computer.
  10758. ==============================================================================
  10759.  
  10760. ======================================================================
  10761. Score Screen Upgrade:
  10762. Make it a borderless backdrop window on a 640x512x16 colors interlaced
  10763. screen.  Just use SP1HiResWindow.
  10764.  
  10765. Need 11 lines of text * 40 points = 440 points + 1 blank line = 480 points.
  10766. Just 1 screen for now.
  10767. Player Scores for Turn x.
  10768. Player            Team   Life   Score
  10769. 9 lines of name + score.
  10770. For now I'll use the same ChaosCalligraphyFont40.  But maybe I'll use a
  10771. different one later when I think of a good one to use.
  10772. Use Team Numbers instead of graphical symbols.
  10773.  
  10774. What should the colors be????  I need to use something other than dark
  10775. blue for the background!  For simplicity I'll just use the exact same
  10776. colors that are already being used. (Black background).
  10777. Try to use the SP1HiResScreen for the Score Panel and Spell Panel.
  10778.  
  10779. Oh well I'm tooo tired to care about the colors now.  I'm just leaving the
  10780. colors as they stand.
  10781.  
  10782. * Score Screen now looks halfway decent at least.
  10783. =============================================================================
  10784.  
  10785.  
  10786.  
  10787. JJ Complaints   ==============================================================
  10788. * COMPLAINT: When playing in (!ExplorationMode and !TexasTrashem) the
  10789.   exploration mode related spells should not appear in your spell lists.
  10790.   Just make a new tag: OnlyUsefulInExplorationMode
  10791.   Spells with this tag will have their probability set to 0 in the
  10792.   chaos.prb file.  Their probabilities will be normal in the ExplorationMode.prb
  10793.   file.  NOW IMPLEMENTED.  Works great.
  10794.  
  10795. * Spells which are only useful in ExplorationMode are now only dealt out if
  10796.   you play the game in ExplorationMode or in Texas Trash'em mode.
  10797.  
  10798. * COMPLAINT: He wants a Music OFF feature.  NOW IMPLEMENTED.  Works great.
  10799. ================================================================================
  10800.  
  10801. * FIXED Magic Sword Description.
  10802. * FIXED GooeyBlob spell description from "on recovery" to "after being uncovered"
  10803.  
  10804. CHANGED:
  10805. * Ropers, Wasp Nests, Pits, Magic Castles and Dark Citadels can now be cast
  10806.   on dead bodies.
  10807. * Rocks now allow 3 attempts.
  10808. * Combat Drain Beam damage increased to 8.
  10809. * Nonarchery is now known as Archerotomy.
  10810.  
  10811. ****************************************************************************
  10812.                          InitialData[] bugs
  10813. ****************************************************************************
  10814. Previously there were 3 serious bugs related to InitialData[]:
  10815. 1. The negative score bug.
  10816. 2. The isIDcreature() bug.
  10817. 3. The isIDblahblahetc() bugs (numerous macros were broken).
  10818.  
  10819.  
  10820. Current bugs related to InitialData[]:
  10821.   chaos.c
  10822. * BUG: All the recovery code (life recovery, intelligence recovery, etc.) has
  10823.   code that checks the InitialData[id].Life, etc.  But there is NO
  10824.   InitialData[id].Life for a magic spell scroll!  So the return result is
  10825.   unknown and will be random over time, as spells are changed/added.
  10826.   It could possibly cause an enforcer hit.
  10827.   NOW FIXED by using the macro.
  10828.  
  10829. * core.c
  10830.   BUG: The code for GooeyBlob uncovering sets:
  10831.      b->char_stat.Life =InitialData[b->id].Life >>1;
  10832.      But there is no such thing for a magic spell scroll! NOW FIXED.
  10833. * The WakeUp() routine has an InitialData[id].Weight which does not exist for
  10834.   magic spell scrolls.  NOW FIXED.
  10835. * Promote() accesses InitialData[id].Life, etc.  This should only be used with
  10836.   creatures so it should not cause any bugs. NOW FIXED.
  10837. * All occurences of InitialData[] replaced with InitialData() in core.c
  10838.   EXCEPT for InitialData[NOTHING] occurrences.
  10839.  
  10840. * move.c/Growth() also accesses InitialData[id] but this should only be used
  10841.   with growths so it should not cause any bugs.  But a scroll of a growth
  10842.   is still a "growth" so it might someday cause a bug, arggh.
  10843. * move.c/Growth() more code for uncovering something covered by a growth
  10844.   which accesses InitialData[id] for scrolls that have no such thing.
  10845. * move.c/Combat() would do an invalid access of InitialData[id] if a magic
  10846.   spell scroll had HORROR on it.
  10847. * ALL occurrences of InitialData[] replaced with InitialData(), even the
  10848.   ones that were technically 100% safe because in future years after new
  10849.   object types are added they might become unsafe.  Better safe than sorry.
  10850.  
  10851. * spell.c/IntelligentComputerSpellSelect() is using the value of
  10852.   InitialData[id].Life for scrolls which have no such value!
  10853.   Oops the code is actually ok due to it saying "IF (isIDcreature(sp) and InitialData(sp).Life >s[STRONG]"
  10854.   I was thinking it said "isCreature" instead of isIDcreature.
  10855.   I replaced InitialData[] with InitialData() anyway.
  10856.   DONE.
  10857.  
  10858. * cmove.c/GetCellWeight() is using InitialData[id].FavoriteFood and
  10859.   .RunsAwayFrom!  This is wrong for magic spell scrolls.
  10860.   Replaced with InitialData() macro.
  10861.  
  10862.  
  10863. There is already quite a lot of hacked-in code for not using InitialData[]
  10864. beyond ExitID and I'm wasting too much time fixing silly bugs that never
  10865. should have existed in the first place so I'm thinking of implementing the
  10866. objects more as a true database and adding InitialData[] for EVERY id.
  10867. This will burn 10 or 20k but since it makes the game more reliable, easier to
  10868. code and keeps the code cleaner; it should be well worth it.
  10869.  
  10870. The other option is to hack in some IF-THENs for each of the above listed
  10871. cases + we would have to remember to do the same each time we add new code
  10872. which uses InitialData[id].
  10873.  
  10874. A third option is to make some sort of GetInitialData() macro which checks that
  10875. the ID is <= ExitID and returns the appropriate value.  Then I just
  10876. search/replace all occurences of InitialData[] with GetInitialData()
  10877. USING THIS OPTION.
  10878.  
  10879. #define InitialData(x) InitialData[(x) > ExitID ? 0: (x)]  Not good enough
  10880.  
  10881. #define InitialData(x) (InitialData[(x) >=0 and (x)<=ExitID ? (x):( (x)<0 or (x)>RevealID ? *(char *)0 : 0))
  10882.  
  10883. The above macro will be used because it handles the quirkiness of there not
  10884. being InitialData for id's over ExitID _AND_ it does array bounds checking!
  10885.  
  10886. more examples in SC:ArrayBoundsChecking.txt
  10887.  
  10888. * Replaced all occurences of InitialData[] with InitialData() macro just to
  10889.   be safe in cast.c and info.c and init.c and all the spell files.
  10890.  
  10891.  
  10892. Could just have a "magic spell" bit to delineate the 2 regions?
  10893.  
  10894. * Chaos now has Array Bounds Checking, but only on the InitialData array.
  10895.   Currently for the bounds checking to actually report anything you must run
  10896.   the game under cpr and have enforcer running.  Then bad subscript errors
  10897.   are trapped and the cursor is placed on the offending line just like in
  10898.   BASIC.
  10899. ****************************************************************************
  10900.                       END InitialData[] bugs
  10901. ****************************************************************************
  10902.  
  10903.  
  10904. * BUG: Violet Fungi graph has a line drawn through it.  FIXED.
  10905.  
  10906. * BUG: The right hand side end turn gadget isn't being redrawn when you
  10907.   examine an object on the board or a spell in your spell list. FIXED.
  10908.  
  10909.  
  10910. Feb. 15th, 2000:
  10911. * Incorporated SAI's new arcing weapon effect on all the elves.
  10912.  
  10913. Feb. 16th to Feb 22nd: Moving to new apartment.  No programming
  10914. accomplished.
  10915.  
  10916. Feb. 23: Internet account stopped working.  My paid subscription ran out.
  10917.  
  10918. ==========================================================================
  10919. Feb. 23rd to 29th: 
  10920. * 10 NEW CREATURES: Mighty Orc, Oracle, OmniBiologist, Recognomancer,
  10921.   Memory Master, Memory Mage, Necromancer, Chronomancer, Hippocrates,
  10922.   Aesculapius.
  10923.  
  10924. Mighty Orc who (looks just like an orc / looks like an orc
  10925. with a big battleax)  Mighty Orc has stats identical to Orc but with 15
  10926. combat. Prob=9.  Orc has PromotionCount=3, promotes to MightyOrcID
  10927.  
  10928. An Oracle could be equivalent to a Crystal Ball.
  10929. Just add a .Oracle bit to the wizardinfo struct and check it along with
  10930. .CrystalBall
  10931. The Oracle has a Crystal Ball which benefits the casting wizard.
  10932. Oracle can use a fakewizard graphic #6.
  10933.  
  10934. OmniBiologist uses a fakewizard graphic #8.  19 life, 1 combat, 1 move, 0 recover.
  10935. The OmniBiologist is a Biologist, Exobiologist, Chronobiologist,
  10936. Xenobiologist and Exoplanar-Biologist all rolled into one.  He can
  10937. instantly recognize any lifeform from any time-period, or from any other
  10938. planet, or even from any other plane of existence.  Upon viewing any
  10939. scroll, he can recite from memory the complete statistics for any creature.
  10940. If he can make 3 kills he promotes to Recognomancer.
  10941.  
  10942. Recognomancer  fakewizard graphic #7.  19 life, 1 combat, 1 move, 0 recover.
  10943. Either 2 ranged combat against mr (range=3) or make him have actual lightning
  10944. bolt spells.  Graphic of Wizard with staff.
  10945. The Recognomancer is similar to the Omnibiologist but he carries a deadly
  10946. magic staff, making him much more lethal in magic combat.
  10947.  
  10948. Memory Master   Shade Graphic (stats of Ogre) + .memory bit set
  10949. The Memory Master has perfect Eidetic Memory and will always remember what
  10950. is under the object in any square on the board.
  10951.  
  10952. Memory Mage similar to Ogre Mage! Shade graphic. (stats of OgreMage) + .memory bit set.
  10953.  
  10954. Aesculapius is The Roman god of healing. 0 combat.  -4 combat against all non
  10955. recovery rates.  Range=3. Archery.  Max recovery rates in everything.
  10956. Special Combat -4 against life only.  Fake wizard #5.
  10957.  
  10958. Hippocrates: 0 combat  -3 ranged combat against life only. Range=1.
  10959. The legendary Greek healer.  Special Combat -2 against life only.
  10960. Fake wizard #4.
  10961.  
  10962. Necromancer: #3 (casts Kill and Raise Dead 33% of the time.)
  10963.  
  10964. Chronomancer: #2 (casts Vanish 20% of the time.)
  10965.  
  10966. 3 new special creature types:
  10967. .Memory (remembers what is under a cell. Elephant, Memory Master, Memory Mage)
  10968. .RecognizeCreatures (allows you to see the stats of scroll creatures +
  10969.          recognizes the creatures in your bonus spells list.
  10970.          OmniBiologist and Recognomancer)
  10971. .Oracle (equivalent to having a CrystalBall. Oracle)
  10972.  
  10973. * Need the above 3 in the wizardinfo struct also. DONE.
  10974.  
  10975. * BUG in sm.c: It won't process my creatures with negative combat or
  10976.   negative ranged combat. NOW FIXED.
  10977.  
  10978. * Special Programming for Oracle done.
  10979.  
  10980. * ELEPHANT now has perfect Eidetic Memory.
  10981.  
  10982. * INFO PANELS modified to show you what is under the cell if you have the
  10983.   memory powerup.
  10984.  
  10985. We might want to make a graphic that means "You currently possess the
  10986. perfect Eidetic Memory Powerup" to be displayed as a wizard powerup in
  10987. ExtraDisplay();  If anyone wants to draw or render or rip such a graphic
  10988. then please do so.
  10989.  
  10990. Should there be an "Eidetic Memory" spell?  It seems too weak.  Its better
  10991. to cast a creature that has Eidetic Memory built-in.
  10992.  
  10993.  
  10994. Need to add code so that if you have the .Recognize powerup, pressing the
  10995. LMB on the 2nd info panel of a scroll brings up an info panel of stats
  10996. showing the InitialData[id] stats. So how do I do this?
  10997.  
  10998. I can't simply make a pointer to a fakecell and call the InformationPanel()
  10999. with this pointer because InformationPanel() has code which requires a
  11000. numeric cell number.  Actually there are only 2 lines of code which require
  11001. a real cell number and they are related to exploration.  (A long time ago I
  11002. had to take the exploration info out of the cell structure because it saved
  11003. me a LOT of problems rewriting code... however the price is that it is now
  11004. causing me THIS problem)  Luckily this is easily worked around.
  11005.  
  11006. Options:
  11007. A: allocate memory for an extra cell in board[] and use that as a fakecell.
  11008.    Then the cell will have a real number.  This would be very easy to do but
  11009.    would wreak havoc with the array bounds checking. DO NOT DO THIS.
  11010.  
  11011. B: Change the InformationPanel() cell parameter so that -1 means "This cell is
  11012.    a fake cell" and then add in 2 if-thens to not use any code that
  11013.    requires a real cell #. (only the exploration-related code requires a
  11014.    real cell number due to exploration bits not being contained in the
  11015.    playCell structure.)  DONE.
  11016.  
  11017. * Now I can simply make a pointer to a fake cell struct and call
  11018.   InformationPanel() on that fake cell struct! Easy.
  11019.  
  11020. * If the wizard possesses the .Recognize powerup then pressing the LMB on the
  11021.   2nd info panel of a scroll brings up an info panel of stats showing the
  11022.   InitialData[id] stats.  DONE.
  11023.  
  11024. * New Routine: RecalculatePowerups();
  11025.  
  11026. Casting the memory master gives you the Memory powerup.
  11027. Death of memory master makes you lose the powerup.
  11028.  
  11029. Ditto for RecognizeCreatures powerup and Oracle powerup.
  11030.  
  11031.  
  11032. A death or warp requires a total recalculation.
  11033. A birth/insert doesn't really need a total
  11034. recalculation it just needs a simple test on the 1 creature.
  11035. For simplicity I will do a total recalculation in every instance since
  11036. deaths/warps/births/inserts don't happen very often so cpu speed is not
  11037. essential.  Also doing the total recalculation each time will help to
  11038. "cover up" future bugs whereby some new spell does something wacky and
  11039. forgets to call RecalculatePowerups();
  11040.  
  11041. Do creatures which are in the underpart of a cell provide powerups?
  11042. I am going to say YES because:
  11043. #1: Its easier to code it that way.
  11044. #2: It sort of makes sense that an Oracle underneath a growth would still be
  11045.     able to see things with his crystal ball. (ok not really... but..)
  11046.     It sort of makes sense that a Recognomancer under a growth would still
  11047.     be able to recognize things by the wizard sending him a mental image of the
  11048.     thing to be recognized.
  11049.     It sort of makes sense that a Memory Master would still remember
  11050.     everything while he is under a growth.
  11051. #3: Nothing needs to be recalculated just because something went from the
  11052.     underpart to the visible part of a cell (or vice versa).
  11053.  
  11054. * Added in code to call RecalculatePowerups() in all appropriate core.c
  11055.   functions EXCEPT BackUpCellWizard() and RestoreCellWizard() because I'm
  11056.   not sure how those do/should work.
  11057.  
  11058. Unfortunately RecalculatePowerups may get called 2 or 3 times in certain
  11059. routines like Reinstate.
  11060.  
  11061. * Added in code to call RecalculatePowerups() in warp.c.
  11062.  
  11063. That SHOULD cover all the places that need RecalculatePowerups() added.
  11064. However if there is any place in the code that removes some thing from the
  11065. board or puts something on the board without using 1 of the above routines
  11066. then there will be a slight bug.  Should such a thing happen it will be
  11067. neccessary to modify the offending code with a call to
  11068. RecalculatePowerups() or modify it to use one of the above routines.
  11069.  
  11070. * BUG: EditorPaste just puts stuff into a cell without using
  11071.   InsertCreature() and it doesn't ever call RecalculatePowerups(); so
  11072.   inserting Oracles, Memory Masters, Omnibiologists etc. doesn't give your
  11073.   wizard the appropriate powerup.  NOW FIXED.
  11074.  
  11075. * BUG: RecalculatePowerupsFlag was a BYTE instead of a LONG so it was
  11076.   completely and utterly broken.  NOW FIXED.
  11077.  
  11078. * 3 NEW STATS:
  11079. .RecognizeGrowths (MullacDeIrvine)
  11080. .RecognizeInanimates (Inanimatologist, Inanimage)
  11081. .RecognizeSpells (Recognomancer)
  11082.  
  11083. Recognomancer has all above stats set to true.
  11084.  
  11085. * 3 NEW CREATURES:
  11086.   Mullac De Irvine: like a undead fake wizard but can recognize growths. (Wizard graphic #1)
  11087.   4 kills promotes to Recognomancer.
  11088.   Inanimatologist:  Can recognize Inanimates (walls, trees, etc.) Needs a graphic.
  11089.   3 kills promotes to Inanimage.
  11090.   Inanimage is like an Inanimatolgist with the stats of an Ogre Mage.  He
  11091.   heals the friendly inanimates around him. (Same graphic as
  11092.   Inanimatologist)
  11093.  
  11094. * HORRIBLE BUG in sm.c: I have a line in the Recognomancer.spl file:
  11095. Stat:        STANDARD_CREATURE | STATIC_STAT | RECOGNIZECREATURES_STAT | RECOGNIZEGROWTHS_STAT | RECOGNIZEINANIMATES_STAT | RECOGNIZESPELLS_STAT
  11096.  
  11097.   It absolutely refuses to process this line.  It gives bogus errors and
  11098.   screws up the compilation.  It says "Unexpected white space in tag Stat"
  11099.   "Ignoring rest of line in attempt to recover."
  11100.   Ok, the problem was that the LINE_LENGTH in sm.c was set to 128 and after
  11101.   the 128th char it tried to process the rest of the line as a "Stat:" tag
  11102.   (?) Anyway I changed LINE_LENGTH to 256 so its ALL FIXED NOW.
  11103.  
  11104.  
  11105. * Bonus Spell Selection now prints the name of the spell you are pointing
  11106.   at (if you have the appropriate .recognize powerup) at the bottom of the
  11107.   screen.
  11108.  
  11109. Should I allow "q" to work on the bonus spell screen? 
  11110. Or should it just tell you the name of the thing you are pointing at?
  11111.  
  11112. * 2 new bits: .RecognizeProgramming and .Ibrowse (mind reading).
  11113.  
  11114. * 2 NEW INANIMATE OBJECTS:
  11115.   Burstroem's Browser: Allows you to browse through other people's spell lists.
  11116.   Optometron of Omniscience: sets all .recognize bits + .RecognizeProgramming
  11117.   + .Memory + .Ibrowse
  11118.  
  11119. I couldn't decide how to implement the encryption of the programming files
  11120. so I haven't implemented the .RecognizeProgramming feature yet.
  11121. I guess vampire.c just needs to be rewritten as FastVampire.c to load an
  11122. entire file in and encrypt it and write it back out.  The current version
  11123. of vampire.c is entirely toooo slow and greatly reduces compilation speed.
  11124. Just copy coding techniques from jcformat.c into vampire.c.
  11125.  
  11126.  
  11127. Copy everything into sc:chaos_2.81 before I attempt this stuff!
  11128. I might screw everything up!
  11129.  
  11130. Special programming for the .Ibrowse bit:
  11131.   Just make a simple modification to
  11132. 1: RedrawRightHandSide(): NONE NEEDED
  11133. 2: Simple modification to the BoardUpdate();  DONE
  11134. 3: Simple modification to GetSpells(); Just had to move the .necro and
  11135.    and .forgot random clearing code to BoardUpdate();  DONE.
  11136. 4: DisplaySpellList(); NONE NEEDED
  11137. 5: Some complicated mods to HandleIDCMP();  DONE.
  11138. _________________________________________________________________________
  11139.  
  11140. When I compile I am getting an error in line 2681 of chaos.c
  11141. "Error 218: declaration found in statement block"
  11142. This is useless.  And I have no idea where the problem is or how to fix it.
  11143.  
  11144. When I JCformat chaos.c it tells me:
  11145. "Error in line 2416: Ending does not match beginning."
  11146.  
  11147. This is yet another example of a C compiler giving a useless error on a
  11148. line when the REAL error is hundreds of lines of code away.
  11149.  
  11150. * Problem fixed in 2 minutes thanks to JCformat.
  11151. __________________________________________________________________________
  11152.  
  11153. March 5th, 2000.
  11154. * If you have Burstroem's Browser or the Optometron of Omniscience you can
  11155.   now press ctrl-# to browse through other player's spell-lists!  Its very
  11156.   cool!  Pressing the "end turn" / "return" gadget exits the
  11157.   browsing/peeking/mind reading back to your normal spell-selection. DONE.
  11158.  
  11159.  
  11160. ==========================================================================
  11161.  
  11162. * BUG: An Independent Aesculapius keeps shooting my creatures and healing
  11163.   them.  NOW FIXED.
  11164.  
  11165. * BUG: All enemy creatures with negative combat (Hippocrates and Aesculapius)
  11166.   keep healing their enemies and NOT healing their friends.  NOW FIXED.
  11167.  
  11168. * BUG: A human player cannot attack his own stuff with his healing
  11169.   creatures.  NOW FIXED.
  11170.  
  11171. * NEW FEATURE: You can now attack your own creatures if such an attack would
  11172.   heal the creature.
  11173.  
  11174. * BUG: Healing attacks make no sound and no graphical effect.  NOW FIXED.
  11175.  
  11176.  
  11177. * New bit: EXOPHAGY_STAT
  11178. * New stat BYTE char_stat.Scavenge   (allow for negative numbers)
  11179.  
  11180. * 4 NEW SPELLS: Eidetic Xenogenocide, Mnemicide, Scavengerism, Exophagy.
  11181.  
  11182. * IMPROVED AI: I made a new FLAG_HIGHCOMBAT bit to help out the AI of the
  11183.   DemonicTouch and Exophagy spells.
  11184.  
  11185. * Eidetic Xenogenocide has its own special AI routine to decide when to
  11186.   cast it.
  11187.  
  11188. * Scavengerism provides +8 Scavenging to any scavenger or +4 scavenging to
  11189.   any nonscavenger.  A scavenger eats corpses.  Bon Apetit!
  11190.  
  11191.   Scavenger/Nonscavenger is determined by the InitialData[id].
  11192.   (isIDscavenger(id)).  Should be as common as Recover Boost.
  11193.  
  11194.  
  11195. * Exophagy is the act of eating your enemies alive.  Yummy.  Half of the
  11196.   damage you inflict in hand-to-hand combat will be added to your life force.
  11197.   Should be as common as Recover Boost.
  11198.  
  11199.  
  11200. * BUGS: Sleeping Ropers teleport, Sleeping Haunts change sides, Sleeping
  11201.   Volcanos explode, Sleeping Spriggans fall asleep and Sleeping Meditations
  11202.   Collapse.  NOW FIXED. 
  11203.  
  11204. * IMPLEMENTED special code into BoardUpdate() for handling scavenging on
  11205.   March 8th, 2000.
  11206.  
  11207.   HandleScavengerism drains your ScavengerValue*2 from the dead creature
  11208.     beneath you and gives you ScavengerValue of points to your life.
  11209.   You can't drain more life than the corpse has.
  11210.   When you drain a corpse down to negative of its normal maximum it is
  11211.     devoured and disappears.
  11212.   You can't gain more life than your normal maximum.
  11213.   Scavenging always happens AFTER regular healing with recovery rates.
  11214.  
  11215. I have not tested negative scavenger values.  They might freak out.  Who
  11216. knows?
  11217.  
  11218. * NEW SCAVENGER ABILITY:
  11219.   Vulture +2, Giant Rat +4, Neo Otyugh +4, Tyrannasaurus Rex +5,
  11220.   Dire Wolf +2,  Arctic Wolf +2, Orc +1, Mighty Orc +2.
  11221.  
  11222. I might try to make Exorcist -1 later.
  11223.  
  11224. * ADDED Scavenger to the 1st info screen.  It is only shown for those
  11225.   creatures that actually have a Scavenger value.
  11226.  
  11227. * BUG: Speech for Neo-Otyugh and Inanimatologist doesn't work!  NOW FIXED.
  11228.  
  11229. * ADDED Exophagy to the 2nd info screen + the level editor.
  11230.  
  11231. * ADDED Exophagy to the combat system.
  11232.  
  11233. * Currently exophagy only applies to LifeCombat.  So damaging an opponent's
  11234.   intelligence doesn't gain you any intelligence.  Perhaps this should be
  11235.   changed?  This exophagy concept needs to be playtested.
  11236.  
  11237.  
  11238. Enhanced scavenging mode:
  11239. 1: If there is no scavenging going on this turn then don't play the music.
  11240. 2: Play the scavenging music. modified ChaosTheme42
  11241. 3: Count up how many creatures will scavenge this turn.  Divide this number
  11242.    into 7 seconds (350 frames).  This is how much time each creature will be
  11243.    highlighted.
  11244.    Highlight time not to go lower than 50 frames.  So 7 seconds is long
  11245.    enough for 7 scavengers.  The mod can just be position 16 and 17
  11246.    "eatem up yum yum"  then 6,7,8 then looping.  35 seconds of music is way
  11247.    longer than I'll ever need. That's enough for 35 scavengers.  It will take
  11248.    at least 21 scavengers to get to the cool part of the mod.
  11249.    I'll try to work out some way so that the Scavenging Phase can flow into
  11250.    the Artifact changing phase
  11251.  
  11252.    So 7 scavengers or less plays Mod A. (1 pattern of eatem up yum yum then
  11253.    the wild pattern happens at the same time as the screen for
  11254.    "Artifacts Changing Wwners Phase".
  11255.  
  11256.    So 8-14 scavengers plays Mod B. (2 patterns of eatemup yum yum then the
  11257.    wild pattern happens at the same time as the screen for "Artifacts
  11258.    Changing Owners Phase.
  11259.  
  11260.    Possibly should put in some sort of "Dammit he stole my artifact!" or 
  11261.    "He stole my artifact!" into the mod.
  11262.  
  11263.    Mod AA is for the short 1st part + the wild part with "He stole my artifact!"
  11264.    Mod BB is for the double 1st part + the wild part with he stole my artifact!"
  11265.  
  11266. 4: Highlight the creature and do a WriteNearBottom: James's Neo-Otyugh eats
  11267.    some Red Dragon Meat.  Life +4.   Wait 50 frames.  NEXT.
  11268.  
  11269. {flesh,meat,carcass,corpse,cadaver}
  11270. {eats,chows down on, munches on, nibbles on, drinks, sucks on, slurps down,
  11271. scarfs down, chews on, feasts on, ingests}
  11272.  
  11273. "%s's %s {eats} some %s {flesh}.  Life %+d"
  11274.  
  11275.  
  11276. HORRIBLE BUG: When I added 2 new lists into TalkLists I started having
  11277. enforcer hits and crashes.  I ran mungwall/sushi and got tons of mungwall
  11278. hits.  I think I fixed one longstanding mungwall problem but I haven't yet
  11279. been able to stop the current problems and crashes.  When I use the old
  11280. talklists file, everything works fine as before.  This is all very strange.
  11281.  
  11282. Several days later:  I narrowed the problem down to 1 of the 2 following
  11283. lines of code by simply inserting TerminateChaos(0) at various points in
  11284. the start.c startup code.
  11285.  
  11286. One of these 2 lines is totally trashing memory and corrupting things:
  11287. start.c/CommenceChaos()
  11288.   IF (!(ListNameArray=(char **)malloc((NumberOfLists+1)*8))) THEN
  11289.      TerminateChaos(CHMEMORY_ERR);
  11290.   END_IF
  11291.  
  11292. start.c/TerminateChaos()
  11293.   IF (ListNameArray)         free(ListNameArray);
  11294.  
  11295.  
  11296. So either malloc() or free() has horrible bugs (which seems highly
  11297. unlikely)  or there is some other bug somewhere that is trashing some of
  11298. the memory holding the code for the malloc() and/or free() functions (this
  11299. seems AMAZINGLY unlikely, since trashing some program code would normally
  11300. produce an ILLEGAL INSTRUCTION guru.)
  11301.  
  11302. I have replaced that particular malloc/free with AmigaOS AllocMem/FreeMem
  11303. and now the program SEEMS to be working perfectly with no enforcer hits and
  11304. no mungwall hits. HOWEVER, it is my opinion that there is still a bug
  11305. somewhere that is trashing memory because I just ran and quit chaos twice
  11306. and then typed "smake" in the shell and sc gurued with exception 80000004.
  11307.  
  11308. During the last few days of trying to kill this horrible bug I found some
  11309. other hideous bugs that I fixed.
  11310.  
  11311. * BUG: You cannot use the same struct NewScreen to open 2 different
  11312.   screens.  If you do there will be lots of hideous mungwall hits deep in the
  11313.   OS where X bytes of memory are allocated but only X-y bytes are freed.
  11314.   NOW FIXED.
  11315.  
  11316. I think the same thing might be true for struct NewWindow so I modified the
  11317. intro code to use 2 seperate NewWindow structs.
  11318.  
  11319. * MEMORY LEAK: Each time that CloseWindowSafely() is called results in a
  11320.   34-byte memory loss.  I have no idea why this is happening since
  11321.   CloseWindowSafely() doesn't allocate any memory!  I didn't write
  11322.   CloseWindowSafely(), I simply copied it from the Amiga Developer's CD
  11323.   Oh well...  I have replaced all calls to CloseWindowSafely() with old
  11324.   fashioned CloseWindow() and now there are NO memory leaks in Chaos!  YAY!!!
  11325.  
  11326. * BUGS: I still get a mungwall hit + bizarre crashes with zillions of other
  11327.   mungwall hits (sometimes from input.device or Iprefs or CygnusEd, etc.)
  11328.   each time I run chaos, set the options then immediately quit on turn 1
  11329.   without doing anything.  So I have now replaced 2 of those other mallocs
  11330.   and now everything seems to be working perfectly.  THIS IS VERY STRANGE
  11331.   because I replaced the malloc()s with AllocMem() but FORGOT to replace the
  11332.   free()s with FreeMem()!
  11333.  
  11334. 1. reset puter
  11335. 2. run muforce stdio
  11336. 3. run muguardianangel nametag nostackwarn
  11337. 4. run sushi asksave
  11338. 5. run cpr chaos
  11339.  
  11340. OR 
  11341. 1. reset puter
  11342. 2. run c:enforcer/enforcer stdio
  11343. 3. run mungwall task chaos nametag 
  11344. 4. run sushi asksave
  11345. 5. run cpr chaos
  11346.  
  11347.  
  11348. MuLink.lha         dev/misc    94K   4+Memory protect selected hunks of binaries
  11349. Mem2_2.lha         util/moni   39K  77+Memory viewer, editor and browser
  11350. memtest.lha        util/misc   12K 357+Memory Tester
  11351.  
  11352.  
  11353.  
  11354.  
  11355. * BUG FINALLY SOLVED: Ok, the REAL problem was in the TalkList file
  11356.   handling.  There were various FOR-NEXT loops that went while
  11357.   p<=TalkListBufferEnd when they REALLY should have said p<TalkListBufferEnd
  11358.  
  11359.   Also, I was only doing AllocMem(NumberOfLines * sizeof(char *)) instead
  11360.   of the C-proper AllocMem(NumberOfLines+1) * sizeof(char *))
  11361.  
  11362.   BOTH OF THESE BUGS NEVER WOULD HAVE HAPPENED IF C HAD ARRAY-BOUNDS
  11363.   CHECKING!  It took me 18 hours to track down and fix these bugs.
  11364.  
  11365.   ALL IS NOW FIXED! (March 19, 2000)
  11366.  
  11367. * All appearances of malloc() and free() not working were just terrible
  11368.   side-effects of writing 2 elements beyond the allocated memory!
  11369.  
  11370. * Make a modified "Eatemup yum yum mod" to play during the scavenging and
  11371.   artifacts-changing-owners part of the board update. DONE.
  11372.  
  11373. I am taking Blocks from Song 0 and using them in the other songs
  11374.  
  11375. Block 22 becomes block 0
  11376. Block 04 becomes block 1
  11377. Block 05 becomes block 2
  11378.  
  11379.  
  11380. Song 1: 22, END (SHORT Scavenge music 7 seconds)
  11381. Song 2: 22,22, END (LONG Scavenge music 14 seconds)
  11382. Song 3: 22, 4,5 Loop back to 4 (SHORT Scavenge + Artifact music)
  11383. Song 4: 22,22, 4,5 Loop back to 4 (LONG Scavenge + Artifact music)
  11384. Song 5: 4,5 END (Artifact Changing Music ONLY)
  11385. Do enhanced "Artifacts Changing Owners Mode"
  11386. I guess I should divide 14 seconds by the number of artifacts that will
  11387. change.  But it should be at least 1 second per.  And no higher than 7
  11388. seconds per.
  11389.  
  11390.  
  11391. * BUG: startmod ONLY plays song 0 regardless of the supplied song paramter.
  11392.   MUST reassemble the music replaying code with debug info so I can trace
  11393.   through and debug this crap!  But I'm in a hurry so I have worked around
  11394.   it for now by simply doing:
  11395.   loadmod("filename");
  11396.   playmod(songnumber);
  11397.   This works.  But sometimes it doesn't work the very FIRST time you do it.
  11398.   So there are yet more bugs in the music playback system 8(
  11399.   However:
  11400.   loadmod("filename");
  11401.   playmod(songnumber);
  11402.   playmod(songnumber);  seems to make everything work ok.  Just double up the playmod() command.
  11403.  
  11404.  
  11405. * Make a new StartMod() function that works around the bugs by doing:
  11406.   loadmod()
  11407.   playmod()
  11408.   Delay(1);
  11409.   playmod()
  11410.  
  11411.   Then replace all occurrences of startmod and loadmod/playmod with this new
  11412.   routine!  DONE.
  11413.  
  11414.   StartMod(0) doesn't work correctly on song 0 for some unknown reason.  So
  11415.   I am still using startmod(0) for playing song 0.
  11416.  
  11417. * I had all those startmod() problems and implemented all the fixes back
  11418.   when I was writing beyond the bounds of my allocated memory in the TalkList
  11419.   file handling.  So perhaps that was real cause of the problems?
  11420.   Weeks Later: No, the subsongs till usually freak out the very FIRST
  11421.   time they are played.
  11422.  
  11423.  
  11424. March 21st, 2000:
  11425. * Sound sample playing cli command implemented.
  11426. * New End of Turn sound implemented. (I really hated the old one.)
  11427. * New healing sound for combat that heals.
  11428.  
  11429. * BUG: Sound sample cli command always crashes when played from within
  11430.   Chaos and when typed as an actual command in a shell window while chaos is
  11431.   running, it doesn't crash but it just never quits either (until you send it
  11432.   a ctrl-c)  NOW FIXED.
  11433.  
  11434. * BUG: When a creature attacks your SpecialCombat stat, your SpecialCombat
  11435.   stat always becomes -15.  NOW FIXED.
  11436.  
  11437. * PROBLEM: There is a delay when playing sound effects with the cli
  11438.   command.  This is due to 3 things:
  11439.   1. The command must be loaded from the hard drive.  This delay could be
  11440.      reduced by putting the command into the ram: disk. DONE.
  11441.      (It could be eliminated by making the command resident (requires
  11442.      recoding))
  11443.  
  11444.   2. The memory for the buffers must be reallocated each time it is run.
  11445.  
  11446.   3. The sound file must be loaded from disk each time.  I could eliminate
  11447.      this by loading frequently used sounds into memory... or the Ram: disk.
  11448.  
  11449.   4. The animation system is running in 64 colors and its slowing other tasks
  11450.      down.
  11451.  
  11452.  
  11453. * PROBLEM: Aesculapius's shooting attacks increase the target's
  11454.   SpecialCombat.  So I've got several creatures now with SpecialCombat but
  11455.   their SpecialCombatApply and SpecialCombat Except bits are not set so their
  11456.   Special Combat is attacking EVERYBODY (enemies, friends, scrolls,
  11457.   everything).  But since SpecialCombatApply is not set, no actual damage is
  11458.   done.
  11459.  
  11460.   I have 2 options for fixing this:
  11461.   A: Set every creature to have a default SpecialCombatApply of life and
  11462.      SpecialCombatExcept of FRIENDLY.
  11463.   B: Change Aesculapius to not attack SpecialCombat.  This option is the
  11464.      easiest and since Aesculapius is incredibly powerful already I'm going to
  11465.      do this option.  DONE.
  11466.  
  11467. * BUG: Sound sample player cli command ALWAYS freaks out when running 2 of
  11468.   them at the same time. (but only when using the -2 option)
  11469.   NOW FIXED by allocating the sound channels at maximum priority.
  11470.  
  11471.  
  11472. * BUG: sometimes the sound sample player cli command never exits.
  11473.   This might have something to do with either:
  11474.   A: It tries to output an error message and hangs for some reason?
  11475.   B: It hangs when it can allocate the first audio channel but not the 2nd
  11476.      one.
  11477.   C: It hangs due to strangeness in the Audio.device code.
  11478.   D: It hangs due to music system "stealing" the sound channels while it is
  11479.      still playing.  This SHOULD be impossible but it appears to be exactly
  11480.      what is happening.
  11481.  
  11482.   Possible solutions:
  11483.   A: Each time I run JCSound I will soon afterward do a WaitJCSound();  Thus I
  11484.      will never try to run 2 of them at once.
  11485.   B: Modify JCSound to output a message when it is finished to a pipe:file
  11486.      that Chaos will check.
  11487.   C: Modify JCSound to send Chaos a ctrl-d when its finished so I can Wait on
  11488.      it.
  11489.   D: Assume scenario D: above is true and simply make the Music system Wait
  11490.      for JCSound to finish before starting.  DONE.  SEEMS TO WORK PERFECTLY.
  11491.  
  11492.  
  11493. --------------------------------------------------------------------------
  11494. ----------------------  WaitJCSound routine -------------------------------
  11495.  
  11496. * WaitJCSound() routine. DONE.  Uhmmm... It doesn't work.. FindTask() NEVER
  11497.   finds my tasks by name! 8(
  11498.  
  11499. OPTIONS:
  11500.   1. Use SASC Fork() and Wait().
  11501.      Advantages: Easy to wait for it to complete.  Don't have to muck
  11502.                  around with messageports and things.
  11503.      Disadvantages: Fork REQUIRES that the code be a program stored on disk,
  11504.                     thus there is a slight delay while the code is loaded.
  11505.  
  11506.   2. Use AmigaOS CreateNewProc.
  11507.      Advantages: Can directly call code in the main program as a
  11508.                  subtask/subprocess.
  11509.      Disadvantages: I'd have to rewrite JCSound to be internal to the main program.
  11510.                     I'd have to create some ExitCode to send the main
  11511.                     program a message when JCSound is finished.  This
  11512.                     requires making a secret messageport to check.
  11513.  
  11514.   3. I could just rewrite JCSound to take an extra MessagePort parameter and
  11515.      then JCSound would simply send a message to that port when it is finished.
  11516.   3A. Or I could rewrite JCSound to do a FindPort() for ChaosJCSoundPort
  11517.       and send a message to it when finished.
  11518.  
  11519.   4. I could rewrite JCSound to be internal to the main program AND it will
  11520.      simply run continuously and send the main program a message when it is
  11521.      finished.  This way it doesn't have to keep reallocating its buffers and
  11522.      stack and everything!!!!!
  11523.  
  11524.      Advantages: Only have to CreateNewProc on it ONE TIME.
  11525.                  It would always be loaded into memory and would be
  11526.                  instantaneously fast at getting started.  No more waiting
  11527.                  while it allocates all its memory and stuff.
  11528.  
  11529.     Disadvantages: It must CreatePort() a message port to receive various
  11530.                    messages such as:  START, STOP, UNLOAD.
  11531.                    Or perhaps it could just respond to ctrl-c etc.
  11532.  
  11533. OK, the problem is that when you run a program in a cli the taskname is set
  11534. to "CLI 6" or somesuch.  I tried putting in a
  11535. SetProgramName("ChaosDigitalSoundSubProcess") into JCSound but it still
  11536. didn't put that name into the tasklist, just in some other "command list".
  11537.  
  11538. So now I have simply changed FindTask() into FindPort() to see if the
  11539. subprocess is still running.  Finding a port by name seems to work
  11540. perfectly.  NOW FIXED.
  11541. ---------------------------------------------------------------------------
  11542.  
  11543. There will be a completely seperate cli command called ChaosBackgroundMusic
  11544. which will only be run if streaming background music is activated.  It will
  11545. run in looping mode until it recieves a ctrl-c.
  11546.  
  11547. I've decided not to use the PlayADPCM command due to the fact that hard
  11548. drive storage is sooo cheap these days.  Hard drive space is not a problem
  11549. anymore.
  11550.  
  11551. * JCSound is currently 18640 bytes in size.  I am now recompiling it with
  11552.   optimize.  Now its  17948 bytes in size.  SAVED 692 bytes.
  11553.  
  11554. * ADDED in some code so that combat sounds can be added by the end user by
  11555.   simply putting an 8svx sound file into the dir Sounds/Combat/Monster Name
  11556.   where "Monster Name" is the exact name of the monster that will play this
  11557.   sound effect when attacking.  The name must be exact.  It is
  11558.   case-sensitive.  Spaces must be correct also.  Do NOT place an extension
  11559.   such as .8svx onto the filename.
  11560.  
  11561.   Now when someone is playing the game and they say "Hey!  I have a GREAT
  11562.   sound effect for this monster!  I wish I had some way of adding it to the
  11563.   game.", they can really do it!
  11564.  
  11565.  
  11566.  
  11567. ------------------------------------------------------------------------
  11568. STRANGE BUG: I just did a "smake clean" then "smake" and no errors are
  11569. reported but when it gets to the linking phase slink complains that
  11570. _GeneralImages has not been defined anywhere.  I searched through the
  11571. entire program code and, sure enough, GeneralImages is not defined
  11572. anywhere.
  11573.  
  11574. GeneralImages is supposed to be defined in creature.d.
  11575. Creature.d is created by makedata which comes from makedata.c which comes
  11576. from graph.tex.
  11577. makedata makes creature.d by processing makedata.txt.
  11578. What makes makedata.txt?
  11579. The spellmanager script makes makedata.txt by joining a bunch of files
  11580. together!
  11581. JOIN ram:image1.tmp ram:image2.tmp ram:image3.tmp ram:imaged.tmp makedata.tmp AS makedata.txt
  11582.  
  11583. Above line is unchanged in all my old version of chaos
  11584. so makedata.tmp must not be getting made correctly!!!
  11585. Uhmmm... makedata.tmp DOES NOT EXIST.  It is NEVER created or modified by
  11586. anything anywhere!
  11587.  
  11588. However in the makefile there is this curious construction:
  11589. creature.o: makedata initial_data.c
  11590.     makedata
  11591.     copy ram:images.tmp creature.d
  11592.     type ram:il.tmp >>creature.d
  11593.     delete ram:images.tmp
  11594.     delete ram:il.tmp
  11595.     sc $(STDOPS) nodebug optimize  memorysize=huge creature
  11596.  
  11597. makedata is used to creature creature.d and then the type command is used
  11598. to join "il.tmp" onto the end of creature.d.  So I guess il.tmp is not
  11599. being created properly.
  11600.  
  11601. But makedata.c is simply processing whatever is in makedata.txt!!!!
  11602.  
  11603. I cannot figure this out!
  11604.  
  11605. Ok I sort of figured out what was actually missing from the program and
  11606. hand edited everything to work.  This took a couple of hours and made me
  11607. late for work.  I imagine this is all going to happen again the next time I
  11608. add new spells to the game and must completely recompile everything.
  11609. I fixed this months later once I discovered that a *.tmp file was missing
  11610. in the directory.
  11611. ------------------------------------------------------------------------
  11612.  
  11613. * BUG: When playing Texas Trash'em Select a spell, then examine a spell.
  11614.   When you are finished examining your spell only the part of your spell list
  11615.   up to the point of the spell that you are casting gets redrawn.  The others
  11616.   are not redrawn.  This is a problem in DisplaySpellList().  NOW FIXED.
  11617.  
  11618.  
  11619. =========================================================================
  11620.  
  11621. * Modify the combat routine to play the combat sound if present for
  11622.   this monster.  DONE.
  11623.  
  11624. What the hell do I do now?  Do I make a NEW ROUTINE called:
  11625. CellEffectWithDigitalSound()
  11626. Disadvantages: It would HAVE to duplicate all the gfx code of CellEffect()
  11627. therefore it seems stupid.
  11628. Advantages: Don't hafta go through and add ,NULL to all function calls.
  11629.  
  11630. Or do I just add a new parameter to CellEffect()
  11631. Disadvantages: Hafta add ,NULL to all existing CellEffect() calls.
  11632. Advantages: Allows me to mix and match any gfx effect with any sound
  11633. effect.
  11634.  
  11635. I am going to send in a char * parameter which points to a string which
  11636. contains the filename.  Here is the BIG problem!
  11637.  
  11638. I don't want to have to constantly do
  11639. sprintf(text_store,"Combat/%s",creature_name[x]);
  11640.  
  11641. I could JUST pass in ,creature_name[x])  THEN IF it is a ATTACK sound then
  11642. CellEffect will assume the Sounds/Combat/ part of the filename and do the
  11643. sprintf itself.
  11644.  
  11645. * Changed Jillions of CellEffect() calls to also pass a ,NULL parameter.
  11646.   Hopefully within a year most of these NULLs will be replaced with real
  11647.   digital sound effects.
  11648.  
  11649. =========================================================================
  11650.  
  11651.  
  11652. 0. Assign a couple of sound effects to test out the system!
  11653.    Ok it works BUT OMSS 1.03c and DSS8 and SFX3.50 all refuse to save the
  11654.    playback speed information into the sound sample!  So the speeds are all
  11655.    wrong!
  11656.  
  11657.    OPTIONS:
  11658.    A: DL that little ratechanger cli proggy from aminet.
  11659.       samrate15.lha      mus/edit    12K 128+Changes pitch of 8SVX samples
  11660.       No, this is a pitchshifter which is very nice but not what I want.
  11661.  
  11662.    B: Switch to a new sample editor program from aminet or from my
  11663.       collection.  There are about 2 dozen different ones!  I have no idea
  11664.       which ones to try!  I guess I'll try the 10 year old AudioMaster 4.
  11665.  
  11666.    I FINALLY FIGURED IT OUT.  In OMSS you must hold the mouse button down
  11667.    and simultaneously press a note key to register your note.  THEN from
  11668.    within the Sample Editor Window you must select
  11669.    Tools/Copy Pitch/Sample Editor -> Inst. Default
  11670.  
  11671. * BUG: If you have a creature that has Ranged Combat and he is attacked
  11672.   by a Range Drain Beam spell such that his Ranged Combat is reduced to 0
  11673.   then a subsequent Range Boost spell will NOT work on him!  Simply put:
  11674.   the bug is that Range Boost does not work on creatures with 0 Ranged
  11675.   Combat EVEN THOUGH they had some "initial ability".  NOW FIXED.
  11676.  
  11677. * INSTALLED over 50 new digital sound effects into the game.
  11678. * The Eagle has a real Eagle sound when attacking.
  11679. * The Vulture has a real Vulture sound when attacking.
  11680. * The Crocodile and ShapeChanger have a real Alligator sound when
  11681.   attacking.
  11682. * Magic Glass now makes a breaking glass sound when it is killed.
  11683. * Dire Wolf yelps when it dies.
  11684. * Arctic Wolf whimpers when it dies.
  11685. * All Dragons make hideous screams when they die.  They are now 4x as much
  11686.   fun to kill!
  11687. * When you kill a generator the crowd goes "Aaaaaaaahhhh" in amazement.
  11688. * Jaguar and Leopard go "rrreeeeeooooowwwwwrrrr" when they die.
  11689. * Stone Giant says "I kill you!" when he kills someone.
  11690. * All Ogres say "Attack!" when they attack something.
  11691. * All dragons, cats, Hydras, Bears and Tyrannasaurus roar when they attack.
  11692. * Neo-Otyugh makes an eating sound when he attacks.
  11693. * All Wolves howl when they attack.
  11694. * Robot makes a mechanical sound when it attacks.
  11695. * All Horse-like creatures make real Horse-like sounds when they attack.
  11696. * Gorilla makes a real Gorilla sound when attacking.
  11697. * Fire Demons and Devils laugh evilly when attacking.
  11698. * Ghost goes "wooOOooOOooOOoo" when attacking.
  11699. * Camel makes a real Camel sound when attacking.
  11700. * Water Elemental makes a water sound when attacking.
  11701. * Fire Elemental makes a burning fire sound when attacking.
  11702. * Air Elemental makes a wind-blowing sound when attacking.
  11703. * Earth Elemental makes a rocks falling sound when attacking.
  11704. * King Cobra makes a rattlesnake rattling sound when attacking.
  11705. * Stone Giant goes "OOOORAAH!" when attacking.
  11706. * Wolverine growls when attacking
  11707. * Bodak and Bird-Lord make sounds when attacking.
  11708.  
  11709. I need to have some sort of generic attacking and dying sound for all those
  11710. wimpy bipedal creatures.  Any ideas?
  11711.  
  11712. * INSTALLED 3 new chaos theme songs on March 29th, 2000.
  11713.  
  11714. * CHANGED scavenging to drain as many points as are gained.  (It used to be
  11715.   2x as many.)
  11716.  
  11717.  
  11718. ====================== JJ Bug Report: ==============================
  11719.  
  11720. * BUG: Turmoil caused wizards to be riding independent generators, fauns,
  11721.   etc.  This was caused because TurmoilHandler() ONLY checked if the source
  11722.   cell had a mounted wizard and moved the wizard correctly.  It wasn't
  11723.   checking if the destination cell had a wizard.  NOW FIXED.
  11724.  
  11725. * STUPID: Wizard cast Restoration on his cloaked, combat, magic shielded
  11726.   wizard.  I changed it so wizards no longer cast restoration on their
  11727.   cloaked creatures.  NOW FIXED.
  11728.  
  11729. * BUG: Wizard is engaged to a creature.  Wizard attacks magic wood tree and
  11730.   kills it thus immediately moving into the space and disappearing into lala
  11731.   land.  Ok, I have now made it so that if a wizard is engaged he cannot
  11732.   attack, mount or move onto any meditation.  It will simply say 
  11733.   "You cannot enter a meditation while engaged".  NOW FIXED.
  11734.  
  11735. * BUG: Necropotence usually causes the game to lock up.
  11736.   I played a game and cast Necropotence on a computer wizard and he cast
  11737.   Necropotence on me several times but nothing bad ever happened.
  11738.  
  11739.   Ok I'm trying it again this time I've set it up so that the computer guy
  11740.   doesn't have ANY creatures, thus if I Necropotence him he'll have NO spell
  11741.   to cast.  It locked up in an infinite loop.  NOW FIXED.
  11742.  
  11743. =====================================================================
  11744.  
  11745. * REDUCED THE VOLUME of the algorythmic sound effects so they don't
  11746.   overpower the digital ones.  Technically they have always been too loud.
  11747.   A perfect sine wave going from +127 to -128 is really too much.
  11748.   I've reduced it to +90 to -90.
  11749.  
  11750. * CHANGED Vampire to have -4 recovery + exophagy so that when he attacks he
  11751.   recovers 1 point.  If he does not constantly feed on creatures he will
  11752.   soon die.
  11753.  
  11754. * SWAPPED the ranged combat stats of Shadow Dragon <-> Pseudodragon so they
  11755.   would make more sense.
  11756.  
  11757. * PROBLEM: You can get an Iridium horse in every single game because a
  11758.   typical game includes 2 or more aviaries, thus Bird Lords are abundant and
  11759.   its only a matter of time till you get an Iridium Horse.  This whole
  11760.   thing is actually a bug.  Iridium Horses are SUPPOSED to only be made
  11761.   when killing a DRAGON (or a Tyrannasaurus Rex).  NOW FIXED.
  11762.  
  11763. * Now using the "Hallelujah" choir sample for the bonus spell noise.
  11764.  
  11765. * ADDED IN THE CODE TO PROCESS Sounds/Kill/ and Sounds/Death  DONE.
  11766.   Now anyone can make a sound effect for when a creature kills something or
  11767.   for when a creature dies just by putting the sound in the appropriate
  11768.   directory and naming the file with the name of the creature.
  11769.  
  11770. * I went back and listened to every sound effect and several of them were
  11771.   not very loud so I edited them and increased their volume to 188%.  I kept
  11772.   the original sounds in sc:OriginalUnmodifiedSounds/.
  11773.  
  11774. * BUG: Sometimes the digital sounds fail to play because they can't
  11775.   get one of the audio channels.  I believe this is because AlgoFreeChannel
  11776.   was not doing a ADCMD_FREE before it closed the audio device.
  11777.   Also sometimes the speech flips out and sounds on 2 channels at once.
  11778.   ALLEGEDLY NOW FIXED.  (hopefully this fixes the subsong problems too)
  11779.  
  11780.   uhh... hmm...  The only thing that has changed is that the algorythmic
  11781.   sound effects now proceed MUCH faster than before....  They appear to be
  11782.   at least 4x faster.  Probably because it is freeing the channel before
  11783.   the sound is complete.
  11784.  
  11785.   I still get all the same weird audio bugs as before. :(
  11786.  
  11787. 1. Play a test game with the speech OFF to see if that makes any difference.
  11788.    It didn't make any difference that I could tell.  Sometimes JCSound
  11789.    couldn't allocate its channel just like always. :(
  11790.  
  11791. 2. Play a test game with speech OFF and sound OFF.  Still got the same
  11792.    weird random bugs, possibly due to the fact that sound OFF only turns off
  11793.    certain sounds while others still make noise.
  11794. 2. Investigate FreeAlgoChannel()
  11795. 3. Investigate reusing same struct IOaudio thing. 
  11796.  
  11797. So either Speech routine is messed up or Algo sounds routine is messed up
  11798. or both!
  11799.  
  11800. Originally the audio device was only opened once and then it stayed open
  11801. for the whole game.  Now it is opened and closed all the time.
  11802. So nowadays the first time we open it, we are using a zeroed out ioaudio
  11803. struct, and everytime thereafter we are using an ioaudio struct with stuff
  11804. in it.
  11805.  
  11806. AS AN EASY TEST, JUST MEMSET THE STRUCT TO 0 AND PLAY A TEST GAME THAT WAY
  11807. TO SEE IF THE BUG GOES AWAY!  The bug is still there!  Ack!
  11808.  
  11809. Simply add in a ADCMD_FINISH; Wait();  before the CloseDevice.
  11810. I did this and played a short test game.  It only messed up once and that
  11811. is when I noticed the speech playing on 2 channels at once.  However I
  11812. don't know if it messed up before or after the speech.  I think it messed
  11813. up after the speech did.  Did the speech mess up on its own?  Or did it
  11814. mess up because the algosound messed up?
  11815.  
  11816. I played YET ANOTHER test game to see if it messes up with SPEECH OFF.
  11817. Ok the sounds NEVER messed up!  YAY!  So the only remaining sound effect
  11818. bug is in the speech system!  I looked over the code and didn't see
  11819. anything obvious.  I'm leaving this bug for SAI to fix.  If he can't fix it
  11820. then I'll just rip out the narrator.device speech and replace everything
  11821. with digital speech.
  11822.  
  11823.  
  11824. * HACK FIX: In order to work around the sound channel problems caused by
  11825.   our use of narrator.device, I have put some code into JCsound so that the
  11826.   -2 option (play a mono sample on both left & right channels) will switch
  11827.   down to playing it on _any_ channel it can get hold of if one of the
  11828.   channels is unavailable.  I played part of a test game and the sounds
  11829.   seem to be working 100% now with this fix installed.  But I'm sick now
  11830.   and I only played several turns.  ALLEGEDLY FIXED.
  11831.  
  11832. * BUG: Hippocrates randomly gained a combat point and it made him have 0
  11833.   combat!!! Fix this by checking for negative combat and if so then -1 the
  11834.   combat.  Make sure it doesn't go below -max_combat.  NOW FIXED.
  11835.  
  11836. * MODIFIED RANGE BOOST: so that if it is applied to a creature with
  11837.   negative ranged combat, it will subtract 4 from his ranged combat; thus it
  11838.   will heal 4 points more.  It still adds 4 to the range as usual.
  11839.  
  11840. * BUG Grizzly Bear Combat sound is not working!!!  NOW FIXED.
  11841. * BUG Kill files are not working!!! (Stone Giant didn't say "I kill you")
  11842.   NOW FIXED.
  11843.  
  11844. Always REMEMBER to enclose filename in \" marks!  So spaces in the name
  11845. won't mess it up!  Maybe I should make this into a function?
  11846.  
  11847. * Read docs for narrator.device to see if it is ok to send in an
  11848.   uninitialized struct when opening the device?  Yes it is 100% ok to do
  11849.   this.  According to the RKRM: Opening the device sets the struct to all
  11850.   default values.
  11851.  
  11852. * April 15th: Installed OS 3.1 ROM into JJ's A3000 computer.  He now has a
  11853.   full fledged OS 3.1 computer.  I would have installed a web browser on it
  11854.   so he could read the .html spell docs but he only has 4 megs of fastram.
  11855.  
  11856. * BUG: A computer wizard cast Vodka on the independents.  Their combat was
  11857.   halved like it was supposed to be... but it never said "Independents are
  11858.   drunk with vodka" and the screen did not wave during their movement.
  11859.   NOW FIXED.
  11860.  
  11861. =========================================================================
  11862. April 15th JJ bug report:
  11863. * BUG: Generators do not heal 7 intlligence like the stats say.
  11864.   (Note from JC: Actually NONE of the generator's stats heal like they are
  11865.    supposed to except for life.)   NOW FIXED.
  11866.  
  11867. * BUG: Casting Inanimorphobiosis or StoneToFlesh on a ShadowWood doesn't
  11868.   let you move it around and attack with it.  NOW FIXED.
  11869.  
  11870. * BUG: He walked up next to a computer wizard and did not get engaged to him!
  11871.   But that's ok because the wizard was inanimate and you are not supposed
  11872.   to get engaged to inanimate objects.  BUT this inanimate wizard was roaming
  11873.   around killing things!  So the real bug is:
  11874.  
  11875. * BUG: Inanimate Wizards can still move and attack.
  11876.   I have 2 options for this:
  11877.   A: Make it illegal to cast FleshToStone and MassPetrification on wizards.
  11878.   B: Allow it to be legal and just fix it so that Inanimate wizards can no
  11879.      longer move or attack.  They will still be able to cast spells as usual.
  11880.      And they can reanimate themselves by casting StoneToFlesh or
  11881.      Inanimorphobiosis or Restoration on themselves.
  11882.  
  11883.   I am choosing option B: for now.  If for some reason this does not play
  11884.   well then I can change to option A:
  11885.   NOW FIXED.
  11886.  
  11887.  
  11888. * BUG: An Aerial Servant with max combat gets covered by a growth.  You kill
  11889.   the growth and it still has its max combat. Only the life is cut in half.
  11890.   That is ok.  But if a creature is under a growth for a long time, it eventually
  11891.   gets all of its stats set back to their original values but with life cut
  11892.   in half.  This effect can cause massively awesome creatures to be reset
  11893.   to their original lameness.  This effect can also be used to heal poisoned
  11894.   creatures.
  11895.  
  11896.   --------------------------------------------------------------------------
  11897.   Note from JC: the actual "bug" is that if a creature is covered by a growth
  11898.   and the growth dies of natural causes then the creature's stats are reset
  11899.   to their original values.  However, this is not a bug but merely an
  11900.   "Undiscovered Rule" :)
  11901.  
  11902.   It can be interesting to intentionally allow your poisoned or wounded
  11903.   creatures to be covered so that they can be healed.
  11904.  
  11905.   If you want the creature to be returned to its original stats then you must
  11906.   let it stay covered till the growth dies of natural causes.
  11907.  
  11908.   If you do NOT want the creature to be returned to its original stats then
  11909.   you must kill the piece of growth ASAP.
  11910.  
  11911.   In either case, the life of the creature will be set to one half of its
  11912.   normal maximum.
  11913.   --------------------------------------------------------------------------
  11914.  
  11915. End of April 15th, JJ Bug Report.
  11916. ===========================================================================
  11917.  
  11918. * PLAYED a test game where my wizard and the computer wizard were both
  11919.   inanimate.  It was very interesting and played quite well!
  11920.  
  11921. * BUG: Artifact Creature is covered by growth, growth dies of natural causes,
  11922.   Artifact creature is no longer an artifact but a REAL creature.  NOW FIXED.
  11923.  
  11924. * BUG: Red Dragon Scroll is covered by a growth, growth dies of natural causes,
  11925.   Now the scroll is a REAL Red Dragon belonging to NOBODY!  NOW FIXED.
  11926.  
  11927. * BUG: My wizard is inanimate.  But I can still click on him.  When I move
  11928.   him he doesn't move but some sort of bizarre copy of him is made whose
  11929.   animation is composed of a wizard image, a dead image of something and a
  11930.   grey elf image.  All its stats are 0, but its initial stats are all set to
  11931.   those of a wizard, so its stats look like those of a dead wizard.  Even
  11932.   though it says its "Nothing. (Nobody)"  NOW FIXED.
  11933.  
  11934. * BUG: My Inanimage is ONLY healing my adjacent wizard!  It is somehow not
  11935.   healing my Brown Bear and my Wood Elf.  DOH! This is not a bug!  The
  11936.   description of the Inanimatologist clearly states that it only heals
  11937.   adjacent inanimate objects.  And since my wizard is inanimate in this game
  11938.   he get's healed but my other creatures are not.  EVERYTHING IS OK.
  11939.  
  11940. * OH GOOD GRIEF!  OK Chaos is running and I'm online.  I play chaos for a
  11941.   while.  I'm now in the spell-selection phase.  I notice the modem lights
  11942.   look strange and I go to check my email.  Yam reports that I don't have a
  11943.   TCP/IP stack running (The modem has just gone offline due to it being such
  11944.   a long time since I did anything online).  SOMEHOW this error window
  11945.   freaked out the music in Chaos!!!!  THIS SHOULD BE IMPOSSIBLE!!!  The music
  11946.   has allocated the sound channels at MAX_PRI!!!!   Arrrgh!
  11947.   Well at least I figured out the bug:  The music system defaults to using
  11948.   CIA timer chip #1.  If it isn't available it uses CIA timer chip #2.
  11949.   But Miami can ONLY use CIA timer chip #1!  If it isn't available it just
  11950.   tries to steal the use of it, thus screwing up anything that is using it!
  11951.   So really this is a bug in Miami.
  11952.  
  11953. * Solution: Go online BEFORE starting Chaos.  If you go offline for some
  11954.   reason and you want to get back on just turn the music in Chaos off, then
  11955.   get online, then you can turn it back on if you like.
  11956.   If you forget about this and can't get online for some reason.  Just turn
  11957.   the music off and then you might be able to get online easily or Miami
  11958.   may have already internally crashed.
  11959.   AFAIK this problem only affects Miami, not other TCP/IP stacks.
  11960.  
  11961. * BUG: sm.c will not allow creatures with negative recovery.  Thus my
  11962.   newfangled Vampire won't work.  NOW FIXED.
  11963.  
  11964. ************************************************************************
  11965.                 COMPILE TIME REDUCTION: April 24, 2000
  11966. ************************************************************************
  11967.  
  11968. On a reasonably badly-fragemented (not terrible or anything)
  11969. 25Mhz 030 I did a complete recompile:
  11970. smake clean
  11971. smake
  11972. BEGIN: 3:17:42
  11973. END:   3:39:17
  11974. 21 minutes and 35 seconds.  The last 50 seconds were just doing
  11975. pool2tex <pool.txt >spells.tex
  11976.  
  11977.  
  11978. On a fresh reboot with no memory fragmentation on 25Mhz 030:
  11979. smake clean
  11980. smake
  11981. BEGIN: 4:17:47
  11982. END:   4:38:33
  11983. 20 minutes 46 seconds.  The last 45 seconds were just doing
  11984. pool2tex <pool.txt >spells.tex
  11985.  
  11986.  
  11987. I have now made a gst (Include:all.gst) by reading the docs in
  11988. sc:source/all.gst.
  11989.  
  11990. I have now modified the makefile to use the GST.
  11991.  
  11992. Now I will time a complete recompile using the GST.
  11993. BEGIN: 5:09:46
  11994. END:   5:22:27 with a Slink error 510: _GfxBase symbol - Near Reference to
  11995.        data item not in near data section.  First reference in cast.c to start.c
  11996. 12 minutes 41 seconds + another 50 seconds for pool2tex = 13 minutes 31
  11997. seconds.
  11998.  
  11999.  
  12000. While on YAM+IRC with 3 open windows it took this long:
  12001. 6:18:03
  12002. 6:36:03  18 minutes!
  12003.  
  12004. Redo timing test with fresh computer and not on internet!  No errors
  12005. BEGIN: 12:22:47
  12006. END:   12:36:18   13 minutes and 31 seconds.
  12007.  
  12008. If we subtract out the time that the spellmanager consumes in its
  12009. processing of files and the time that pool2tex burns (total of 2 minutes)
  12010. + the 22 seconds spent printing warnings to the screen then using a GST has
  12011. doubled the compilation speed.
  12012.  
  12013. I could rewrite pool2tex and the spellmanager and save around 1.5 minutes
  12014. thus bringing the compile time down to only 12 minutes but I don't have
  12015. time for that right now.
  12016.  
  12017. If I then switched to using a 25Mhz 040 then the complete recompile time
  12018. should drop to about 4 minutes.  Or if I bought a 66Mhz 060 then I could
  12019. get it down to 1.8 minutes.
  12020. ************************************************************************
  12021.               END COMPILE TIME REDUCTION: April 24, 2000
  12022. ************************************************************************
  12023.  
  12024.  
  12025. * SOUND BUG PERSISTS!  I just played a test game and sometimes the end of
  12026.   turn sound randomly does not play when I press the end turn gadget!
  12027.   ARRRRGGHH!!!
  12028.  
  12029.   HORRIBLE BUG: Twice today when I was shooting something the game totally
  12030.   freaked out and locked up.  Well once it crashed the whole machine and the
  12031.   other time it locked up.  AFAIK this is related to the speech/sound
  12032.   channel bug.  The only way I know of to fix this is to remove the
  12033.   computerized speech from the game permanently.
  12034.  
  12035.  
  12036. BUG: My ally cast Bless and the ChaosWavyTask triggered off 
  12037.   5 MuGuardianAngel hits: All are word reads:
  12038.   42ed8, 42ecc, 42ed0, 42ed4, 42ed8.
  12039.  
  12040. MuGuardianAngelBug: Whenever there is a hit, MuGuardianAngel makes some
  12041. kind of beep that completely corrupts the sound system.  It causes the
  12042. current sound effect or the very next one to run in an infinite loop.
  12043. Sending a ctrl-c to the JCsound task stops the infinite loop but the game
  12044. is still locked up.  Pressing ctrl-c in cpr is useless.
  12045. Maybe this is actually caused by the "heavy cpu load bug" that I found
  12046. later on.  A hit stops all tasks for around 1 second.
  12047.  
  12048.  
  12049. FACT: JCsound cli program works perfectly when I run it from the shell.
  12050. FACT: using JCsound from within Chaos via Execute("run ram:chaosdir/JCsound
  12051.       filename -2 >nil:",0,0); causes random enforcer hits and crashes.
  12052. FACT: Many years ago I made a Star Trek game.  It worked perfectly.
  12053.       Then one day I put digital sound effects in the game using this exact
  12054.       same technique.  Only it was just some sound sample player program that
  12055.       I had, I don't know where it came from.  So it was coded by a totally
  12056.       different person using totally different techniques. I called the cli
  12057.       sound player program using the exact same Execute(); technique and from
  12058.       that moment on the game started randomly crashing and locking up.  I
  12059.       never figured out what was going on with that.  Now I think there is
  12060.       just plain a bug in using Execute() with programs that use audio.device.
  12061.  
  12062.       I JUST TESTED THIS CODE from within Chaos
  12063.            FOR (t=0; t<40; t++) DO
  12064.               Execute("run ram:ChaosDir/JCsound \"Sounds/Combat/Ghost\" -2 >nil:",0,0);
  12065.               Delay(300);
  12066.            NEXT // t++
  12067.       It worked perfectly.  No mungwall hits, no enforcer hits.  Now I'm
  12068.       back to thinking it is somehow a bug caused by some conflict between the
  12069.       algorythmic sounds and the digital sounds.  I tried it with a
  12070.       Delay(100) and it still worked perfectly.
  12071.  
  12072. * I just set the priority of the narrator speaking to 127 (MAXIMUM) so that
  12073.   nothing can steal its channel in the middle of it saying something.
  12074.   Perhaps this will fix the speech bug?
  12075.  
  12076. Ok I just #ifdef'ed all the audio code out of the game.  I turned off the
  12077. speech with the menu and played a test game.  It worked for quite a while
  12078. but then the SAME old audio bug came back to haunt me!  The 4th thing I
  12079. killed with my Ghost caused the JCsound to freak out and cause enforcer
  12080. hits then the whole computer crashed and reset!  Why is that JCsound works
  12081. perfectly under test conditions but crashes randomly in the real game?
  12082. I think this must be related to cpu load now.  I'll do more tests with the
  12083. CPU loaded up with stuff to do.
  12084.  
  12085. Ok I ran the above code loop test at Delay(100) with a gameboard that had
  12086. around 25 animated creatures on it.  Everything worked perfectly.
  12087.  
  12088. So then I switched to ExplorationMode because that burns a lot more cpu
  12089. cycles and ran the test again.  It was working and had played a few samples
  12090. then I clicked on my YAM icon (I had yam already running but it was
  12091. iconified).  This used 100% cpu power for about 2 seconds while it sorted
  12092. through the 604 incoming messages in my mailbox.  This caused 1 instance of
  12093. JCsound to "hang".  So that now the loop is playing a sound sample then
  12094. failing, then playing then failing in an alternating pattern.
  12095. I believe this is caused by doing a Wait on a certain bit and then only
  12096. getting 1 message when in fact 2 or more messages may have already arrived.
  12097.  
  12098. * HACK FIX: I have set the priority of JCsound to run at 126.
  12099.   Actually JCsound was ALWAYS supposed to have been running at priority of
  12100.   126 or 127 since it barely uses any cpu time and it must run at a high
  12101.   priority to ensure that there is no buffer underflow.
  12102.   Now that I have set the high priority the above test works perfectly!
  12103.   However there is still something fundamentally wrong with the
  12104.   architecture of the JCsound cli command.  And someday if some other running
  12105.   task does a Forbid() for 1 or 2 seconds the bug will come back.
  12106.   But at least the game should now run perfectly under "normal" conditions.
  12107.  
  12108. I played a test game with no algorythmic sounds and no speech and the VERY
  12109. FIRST digital sound effect (Combat/Ghost) crashed the machine!
  12110.  
  12111.  
  12112. I repeated the test under extra heavy cpu load.  I was decompressing all
  12113. the jpegs in a directory.  No bugs, no flaws.
  12114.  
  12115. So why does it work perfectly when I do it in the test loop but it crashes
  12116. so often when I play it as an attack sound during combat????????
  12117.  
  12118. Countless other tests producing various results ad nauseum...
  12119.  
  12120. * DOUBLE BUFFERING BUG FIGURED OUT!!  First of all the entire bug is a
  12121.   simple buffer underflow error.  However I wasn't correctly handling the
  12122.   incoming messages so JCsound could hang and never exit.  I still haven't
  12123.   figured out why it would crash.
  12124.  
  12125. * THE REASON why it was crashing after I had set its priority to 126 is
  12126.   this:
  12127.   1. I ran the JCsound program from the shell to test it.  JCsound set
  12128.      itself to pri 126, did its thing and exited.  I had no idea that the CLI
  12129.      inherits the priority of every program that you run in it!  JCsound never
  12130.      set its priority back down to 0 so the default priority of that CLI
  12131.      became 126!
  12132.   2. It worked great in the shell so I then ran Chaos from the CLI.
  12133.      This means Chaos was running at priority 126!  So this completely
  12134.      nullified the effect of running JCsound at pri 126!  JCsound was still
  12135.      having to battle Chaos for cpu time!
  12136.      Since the default buffers of JCsound are only 30k (a bit more than
  12137.      1 second) the buffers were underflowing and messing up.
  12138.      So anyway running Chaos from that CLI caused the JCsound program to
  12139.      crash.
  12140.  
  12141. * JCSOUND ALL FIXED NOW!
  12142.  
  12143.  
  12144. DO A TEST:
  12145.            FOR (t=0; t<40; t++) DO
  12146.               SayCreatureName (0);
  12147.               Execute("run ram:ChaosDir/JCsound \"Sounds/Combat/Ghost\" -2 >nil:",0,0);
  12148.               Delay(11);
  12149.               WaitJCsound();
  12150.            NEXT // t++
  12151. IT WORKS PERFECTLY!!!
  12152.  
  12153.  
  12154.            FOR (t=0; t<20; t++) DO
  12155.               StartMod("Music/Mod.ChaosTheme42",5); // song 5 is ONLY the artifact changing music.
  12156.               Delay(350);
  12157.               endmod();
  12158.               Delay(5);
  12159.               Execute("run ram:ChaosDir/JCsound \"Sounds/Combat/Ghost\" -2 >nil:",0,0);
  12160.               Delay(11);
  12161.               WaitJCsound();
  12162.            NEXT // t++
  12163. First 1 worked, second one failed!  Finally a reproducable error!!!
  12164.  
  12165.  
  12166. Countless more tests and crashes later...
  12167.  
  12168. I can play a mod and then a sound sample.
  12169.  
  12170. But I can't play a subsong in a mod then a sound sample.  It crashes the
  12171. machine.  Something about playing subsongs is corrupting the audio.device.
  12172.  
  12173. Ok I modified the start routine so now at least it always starts playing
  12174. correctly.  However, upon stopping the subsong, the next use of
  12175. audio.device still crashes.
  12176.  
  12177. I tested this with a stopmod() before the endmod();  It still crashes :(
  12178.               StartMod("Music/Mod.ChaosTheme42",5); // song 5 is ONLY the artifact changing music.
  12179.               Delay(350);
  12180.               stopmod();
  12181.               endmod();
  12182.               Execute("run ram:ChaosDir/JCsound \"Sounds/Combat/Ghost\" -2 >nil:",0,0);
  12183.               Delay(11);
  12184.               WaitJCsound();
  12185.  
  12186.  
  12187.  
  12188. // This one crashes too! :(
  12189.               StartMod("Music/Mod.ChaosTheme42",5); // song 5 is ONLY the artifact changing music.
  12190.               Delay(350);
  12191.               StartMod("Music/Mod.ChaosTheme42",0); // song 5 is ONLY the artifact changing music.
  12192.               endmod();
  12193.               Execute("run ram:ChaosDir/JCsound \"Sounds/Combat/Ghost\" -2 >nil:",0,0);
  12194.               Delay(11);
  12195.               WaitJCsound();
  12196.  
  12197.  
  12198. // This works!!!!  (although there is a slight audio glitch at the end
  12199. // because it plays song 0 for 1/50th of a second before stopping the mod..)
  12200.               StartMod("Music/Mod.ChaosTheme42",5); // song 5 is ONLY the artifact changing music.
  12201.               Delay(350);
  12202.               StartMod("Music/Mod.ChaosTheme42",0);
  12203.               Delay(1);
  12204.               endmod();
  12205.               Execute("run ram:ChaosDir/JCsound \"Sounds/Combat/Ghost\" -2 >nil:",0,0);
  12206.               Delay(11);
  12207.               WaitJCsound();
  12208.  
  12209.  
  12210. // This crashes as usual.
  12211.               StartMod("Music/Mod.ChaosTheme42",5); // song 5 is ONLY the artifact changing music.
  12212.               Delay(350);
  12213.               loadmod("Music/Mod.ChaosTheme42");
  12214.               Delay(1);
  12215.               endmod();
  12216.               Execute("run ram:ChaosDir/JCsound \"Sounds/Combat/Ghost\" -2 >nil:",0,0);
  12217.               Delay(11);
  12218.               WaitJCsound();
  12219.  
  12220. // This doesn't crash but the volume stuff doesn't work on medmods.
  12221.               StartMod("Music/Mod.ChaosTheme42",5); // song 5 is ONLY the artifact changing music.
  12222.               Delay(350);
  12223.               loadmod("Music/Mod.ChaosTheme42");
  12224.               Delay(350);
  12225.               mvolume=0;  // All this volume control stuff has NO effect on medmods
  12226.               playing=1;  // because the medmod replayer code being used is not
  12227.               playervolume(); // not set up to handle volume changes! :(
  12228.               playing=0;
  12229.               playmod(); // or plmod()
  12230.               Delay(350);
  12231.  
  12232.               endmod();
  12233.               Execute("run ram:ChaosDir/JCsound \"Sounds/Combat/Ghost\" -2 >nil:",0,0);
  12234.               Delay(11);
  12235.               WaitJCsound();
  12236.  
  12237. Perhaps make a an empty pattern to jump to?  Blah. To much trouble.
  12238. Then I can play song 0 but pattern jump to an empty pattern that makes no
  12239. noise. Blah. To much trouble.
  12240.  
  12241. I could simply StartMod("SomeStupidEmptyMod",0);
  12242. That mod could either do absolutely nohthing or it could play an instrument
  12243. on all 4 channels. But first it would set all 4 channels to volume 0!
  12244.  
  12245.  
  12246. April 28th: The AC compressor in my car broke.  It was making loads of
  12247. smoke.  Ack.  I've only been driving the car for 3 months!  I spent $1700
  12248. to buy it + $400 repairs (new brakes) the first day I drove it to work.
  12249. Now I can either get a rebuilt AC system for $853.10 with 3 month warranty
  12250. or a new one for $1153.79 with 1 year warranty.
  12251.  
  12252.  
  12253. The _only_ good thing about this is I had to miss work on the 29th, 30th
  12254. and 31st so I was able to spend all day fixing all Frédéric's bugs.
  12255.  
  12256. *************************************************************************
  12257. Fri, 28 Apr 2000 11:19:21 -0700 (PDT) Bug report from Frédéric
  12258.  
  12259. > Denotes the writing of Frédéric
  12260.  
  12261. The responses are written by me (James Conwell)
  12262.  
  12263.  
  12264. > * When an alliance is made, it should end at the end
  12265. > of the game, but actually it is valid again for the next game.
  12266.  
  12267. This is NOW FIXED.
  12268.  
  12269. I beleive that setup options should stay the same
  12270. from one game to the next unless you change them.
  12271.  
  12272.  
  12273.  
  12274. > * The giant spider is said to be poisonous IIRC, but
  12275. > it isn't.
  12276.  
  12277. I don't remember it ever saying that.
  12278.  
  12279. In the current version the spider is not poisonous
  12280. and it doesn't say it is poisonous.
  12281.  
  12282.  
  12283.  
  12284. > * You said in the readme that killing a generator
  12285. > would give 4 bonus spells,
  12286. > but I only got one (it was not a bipedal, aviary or
  12287. > dragon nest, but a full-blown generator).
  12288.  
  12289. Wow!  Someone actually reads the readme! :)  I think
  12290. you must be about the only person to do such a thing
  12291. :)
  12292.  
  12293.  
  12294. You only get _1_ spell.  But you get to pick it from
  12295. a list of _4_ spells.  This way your chances of
  12296. getting a REALLY good spell are greatly increased.
  12297.  
  12298. The only way to get to pick more than 1 bonus spell
  12299. is to earn more than 1 bonus spell in 1 turn.  This
  12300. usually means you must kill more than one bonus
  12301. monster/thing in one turn.
  12302.  
  12303. There are other ways which I will leave for you
  12304. to discover :)
  12305.  
  12306.  
  12307.  
  12308. > * Abduction seems to be broken. It did work in v2.3d
  12309. > but it v2.5d the abducted creatures became independent.
  12310.  
  12311. I spent 20 minutes testing out Abduction and I found out that
  12312. Abduction was totally broken!  It didn't "immediately become independent
  12313. again", it NEVER EVER changed the ownership of anyone ever!!!
  12314. (unless you were player 1 and you abducted cell 1... or if you were player
  12315. 2 and abducted cell 2 etc.)
  12316.  
  12317. I always knew I hated the Abduction spell for some reason.  Now I know why.
  12318. Because it didn't work!
  12319.  
  12320. I went back and checked v2.5 and v2.3 and the programming for Abduction
  12321. was identical so it appears to have had the exact same bug as v2.71.
  12322.  
  12323.  
  12324.  
  12325. > * (haven't tried yet with v2.5d) The turmoil spell
  12326. > was broken in v2.3d: the
  12327. > creatures were moved but somehow retained their old
  12328. > positions by some
  12329. > respects. And mounts were moved but not the wizards
  12330. > mounting them (which
  12331. > merely disappered and were still able to cast
  12332. > spells).
  12333.  
  12334. I wish you had reported this bug earlier! :)
  12335.  
  12336. Someone beat you to it and reported this very bug a
  12337. couple of weeks ago and I fixed it the next day.
  12338. Turmoil was broken from the day it was implemented until v2.81.
  12339.  
  12340.  
  12341.  
  12342. > * You say that Bahamut is unique but I've frequently
  12343. > (when playing with lots of scrolls) cast several platinum dragons.
  12344.  
  12345. Yes the description of the Platinum Dragon has always bothered me.
  12346. It has never been unique despite what the description said.
  12347. I've just been waiting for someone to complain about
  12348. it to give me an excuse to fix it.  I have changed the description to
  12349. no longer say it is unique.  NOW FIXED.
  12350.  
  12351.  
  12352.  
  12353. > * When using charm, you could convince scrolls to
  12354. > come on your side ! I can't imagine it's intended.
  12355.  
  12356. hehehehe this is hilarious!
  12357.  
  12358. After thinking about this a while I've decided to leave this the way it is
  12359. so that way Charm has an extra secret use when playing in Exploration Mode:
  12360. It can help you map out the level and show you where some of the scrolls are!
  12361.  
  12362. Ok, I admit that it makes no sense to be able to "Charm" a scroll... but
  12363. it does make the Charm spell more interesting.
  12364.  
  12365. We'll just leave it like it is until more people form opinions on this
  12366. matter.  If anyone has an opinion on this matter please write me and let me
  12367. know.
  12368.  
  12369. It needs further testing in Exploration Mode.
  12370.  
  12371.  
  12372.  
  12373. > There are many other little things I don't remember
  12374. > at the moment but I'll note them down so I can tell you.
  12375.  
  12376. Yes please note down any bugs or discrepancies that
  12377. you find.  I can't fix a bug if I don't know about it.
  12378.  
  12379. If you don't write them down immediately, you'll
  12380. forget them like I do :(
  12381.  
  12382. You should keep your Cygnus Ed Professional running
  12383. with a .txt file of possible bugs/weirdnesses/flaws.
  12384.  
  12385. > Anyway Chaos is really a great game, and
  12386. > I'd like to see an update!
  12387.  
  12388. > ----- Bug Report Part 2: -----
  12389.  
  12390. > Now the things I wrote down today:
  12391. > * There is no difference between the effects of the magic knife and the
  12392. > magic sword: both add 3 points of combat ability to the wizard and enable
  12393. > him to attack undeads. I think the magic knife should not add combat
  12394. > points, just be effective against undeads.
  12395.  
  12396. This has bothered me for years.  I just never got around to changing it.
  12397.  
  12398. Today I have changed it so that Magic Knife gives only +2 combat and
  12399. Magic Sword still gives +3 combat.
  12400.  
  12401. Technically a Magic Knife should only give +1 combat and a Magic Dagger
  12402. should give +2 combat.  But I was afraid people might confuse "Magic
  12403. Dagger" with "Poison Dagger" so I left the name of the spell as "Magic
  12404. Knife"
  12405.  
  12406.  
  12407.  
  12408. > * My gray elf is engaged to an earthquake ! I just cast "No grow" on that
  12409. > earthquake to which my gray elf was adjacent. It's like it's behaving like
  12410. > a creature, as someone just cast dark power on it ! :-) And another was
  12411. > just brain-drained. Somehow they are still growth because "no grow" can be
  12412. > cast a second time. But this attribute is not highlighted in the second
  12413. > info panel.
  12414.  
  12415. hehehe this all sounds hilarious! :)
  12416.  
  12417. There is also another problem: If there is a sea of growth and you cast No
  12418. Grow on a line of the growths to form a "wall" of non-growing growths then
  12419. nothing stops the other growing growths from growing over the nongrowing
  12420. growths. Doh!  So I am changing No Grow to make the growth become inanimate
  12421. as well as making it lose the Growth attribute.  Growths don't grow
  12422. over inanimate objects (except for the Earthquake) so now growths
  12423. cannot grow over the things you cast "No Grow" on.  And you won't
  12424. get engaged to them now and you won't be able to cast Brain Drain or
  12425. Justice on them either.                                     NOW FIXED.
  12426.  
  12427. * BUG: You can cast No Grow on something then cast No Grow on it again and
  12428.   again.  This is silly and wasteful and not what I intendended.  NOW FIXED.
  12429.  
  12430.  
  12431.  
  12432. > * I think there should exist a counterpart to range boost: some sort of
  12433. > "range drain"... Currently (v2.5d), only invulnerability or reflector can
  12434. > save you from range combat. And it only applies to the wizard!
  12435.  
  12436. I already added in a Range Drain Beam spell back in v2.7.  You need to
  12437. upgrade.
  12438.  
  12439.  
  12440.  
  12441. > * The only way to add recovery to some attributes like intelligence or
  12442. > agility seems to be the "touch of God" (or chaos lord :-) ). Why not add a
  12443. > feature like you did for magical resistance: e.g. add some intelligence
  12444. > recovery points if the brain boost is applied to a creature with max
  12445. > intelligence ? Same for agility, combat, range combat, maybe others ?
  12446.  
  12447. I will take this under consideration.
  12448.  
  12449.  
  12450.  
  12451. > * When playing with many scrolls, sometimes a "radioactive land" scroll
  12452. > appears. It has no description (empty screen) and any creature entering or
  12453. > shooting in that cell dies. But it's labelled as a scroll.
  12454.  
  12455. I fixed this today.  Read below for more details.
  12456.  
  12457.  
  12458.  
  12459. > * I can remember one time (with v2.3d) someone had cast "eye for an eye".
  12460. > The manticore my wizard was riding killed a creature of that wizard, so it
  12461. > died. But my wizard hadn't reappeared ! It could cast spells but was nowhere
  12462. > on the board. I don't know if this bug is still there...
  12463.  
  12464. Well I played a test game just now on v2.81 and my Wizard was riding a
  12465. manticore and he killed the other wizard's manticore (which was being
  12466. ridden by him). We both had Eye for an Eye.  Everything worked perfectly.
  12467.  
  12468. End Frédéric bug report.
  12469. **************************************************************************
  12470.  
  12471. * BUG: Computer creatures will NEVER move onto a Pit Scroll or a Radioactive
  12472.        Land Scroll.  NOW FIXED.
  12473. * BUG: Computer creatures will NEVER shoot a Pit Scroll or a Radioactive
  12474.        Land Scroll.  NOW FIXED.
  12475. * BUG: Any creature moving onto a Radioactive Land Scroll dies. NOW FIXED.
  12476. * BUG: Any creature moving onto a Pit Scroll dies.  NOW FIXED.
  12477. * BUG: Any creature shooting a Radioactive Land scroll dies.  NOW FIXED.
  12478. * BUG: Shooting a Pit Scroll says "Wasted Shot" and does not kill the
  12479.        Scroll.
  12480.  
  12481. * BUG: When playing with Scrolls, sometimes a Radioactive Land Scroll
  12482.   appears.  But Radioactive Land isn't even a real spell that can be cast.
  12483.   So I must either:
  12484.   A) Never allow a Radioactive Land Scroll to appear in the first place.
  12485.   B) Rewrite the Radioactive Land spell to be a "real" spell.
  12486.      What should I do?
  12487.   It is my belief that Sean intended that Radioactive Land should not be a
  12488.   "real" spell so I will simply modify the scroll code to never generate one.
  12489.   uhhh... what the hell....  There is already code to prevent spells of 0
  12490.   probability being placed as scrolls.
  12491.  
  12492. * BUG: QueryProbability() is BROKEN!  It has never worked!  It always
  12493.   returns the probability of the spell above it in the list!
  12494.   NOW FIXED!
  12495.  
  12496. * BUG: SetProbability() is BROKEN! It has never worked!  It always sets the
  12497.   probability of the wrong spell!  NOW FIXED!
  12498.  
  12499. * BUG: All saved game files have the wrong probability matrix saved in
  12500.   them.  I DID NOT FIX THIS.  New games will be saving the numbers correctly.
  12501.  
  12502. The only reason spell probabilities were correctly displayed on the spell
  12503. information screen is because the code was hacked to say:
  12504. QueryProbabilty(spell-1);
  12505.  
  12506. Note to Sean: Please please please don't write any more functions that
  12507. require a real number - 1.   Please make the functions require a real
  12508. number instead of a real number -1.
  12509.  
  12510. Please please please don't write any more arrays that require an index real
  12511. number -1.  Please make the arrays require a real number instead of a real
  12512. number -1.
  12513.  
  12514. If this means not using the 0th element then that is totally ok.
  12515.  
  12516. The SpellProbability[] array is still off by 1.  I only fixed the functions
  12517. to take a normal parameter.  Rewriting the SpellProbabilty array to use
  12518. normal numbers requires rewriting various pieces of code that have lots of
  12519. +1 and -1 convolutions due to the array being set up wrong in the first
  12520. place.  Leaving this for SAI to fix.
  12521.  
  12522.  
  12523. Now that I have fixed those probability functions, Radioactive Land Scrolls
  12524. and other 0 probability spells will not be showing up anymore!
  12525.  
  12526.  
  12527.  
  12528. ???: I moved my Dire Wolf to within 3 squares of a Ghast and yet
  12529. my Dire Wolf did not smell him!!  He was _exactly_ 3 squares away.
  12530. OK, this is because the Dire Wolf's smell requires line of sight and the
  12531. intervening unexplored squares block line-of-sight.  So actually it is
  12532. technically working the way it is supposed to.
  12533.  
  12534. I could change it so that the Dire Wolf's sense of smell does not require
  12535. LOS.  This would make it more realistic when there are empty unexplored
  12536. squares between the wolf and the other creature.  But it would make it less
  12537. realistic if there were 2 solid walls between the wolf and the other
  12538. creature.  This would be easy to do.
  12539.  
  12540. I could change it so that the Dire Wolf's sense of smell requires LOS but
  12541. the LOS checking could be changed to use what is REALLY in the cell.  Thus it
  12542. would ignore empty unexplored cells. This would require real work...hmm...
  12543.  
  12544. If anyone has any opinions on this subject then please let me know.
  12545.  
  12546.  
  12547. * STUPID: The computer cast Combat on a Bolter Wall!  NOW FIXED.
  12548.  
  12549. If the Bolter Wall was an inanimate object in the first place, none of
  12550. these Bolter Wall bugs that we've had over the years would have ever
  12551. happened.
  12552.  
  12553. * BUG: My dragon killed a wizard who just cast some trees.  The game made the
  12554.   death sound of a dragon for each tree that then collapsed. (8 times).
  12555.   This is because I was using isDragon(id) instead of isIDdragon(id).
  12556.   NOW FIXED.
  12557.  
  12558. * BUG: Mass Morph is broken!  It _ONLY_ morphs generators!
  12559.   I have changed it to morph all creations EXCEPT generators.  NOW FIXED.
  12560.  
  12561. * FLAW: Casting Mass Morph on something belonging to Nobody results in all
  12562.   empty cells being morphed into Magic Wood Trees.  NOW FIXED.
  12563.  
  12564. * BUG: Sometimes the growths of dead wizards are growing all over the
  12565.   board.  Explanation: a wizard cast some trees on some fire and other
  12566.   growths.  When he dies all the visible board is put to sleep.  Then the
  12567.   trees explode, thus causing those growths to go back to the visible part
  12568.   of the board.  In this manner the growths owned by the dead wizard escape
  12569.   being put to sleep or silently removed.  NOW FIXED.
  12570.  
  12571. * NEW BEHAVIOR: I don't know if anyone ever noticed or not but it used to be
  12572.   that when a wizard died, most of his buried creatures were silently removed.
  12573.   I have now changed this so that they are merely put to sleep.
  12574.  
  12575. * COMPRESSION of Saved Games implemented using lha.  From now on when you
  12576.   save a game as "Blah" it is lha compressed into Blah.lha.  Attempting to
  12577.   load a .lha save file autodecompresses it.  This saves about 70k per save
  12578.   file.
  12579.  
  12580.           Before Compression : After Compression
  12581.   JamesConwellLevels: 222556    9573
  12582.   SAI_Levels:         667618   29236
  12583.   Total:              890714   38809
  12584.  
  12585.   SAVED 851K!!!!!!
  12586.  
  12587.  
  12588. Tuesday May 16th, 2000
  12589. I've been ripped off at my job each day for several days now.  I have been
  12590. extremely stressed out for over 1 week now and have done almost nothing.
  12591. Today I talked to an attorney and I finally calmed down enough to be able
  12592. to do some coding:
  12593.  
  12594. * AUTOSAVE FEATURE IMPLEMENTED:  This feature defaults to ON.  It will save
  12595.   the game automatically on EACH human wizard's turn.  Each save is done into
  12596.   a different filename.  Example filename "004p8AutoSave.lha".  This means
  12597.   that this is the savefile for turn 004, player 8's turn.  The turn number
  12598.   is first so that the files will list in numerical order in the
  12599.   filerequester.
  12600.  
  12601.   From now on if you find a horrible bug that crashes the machine or
  12602.   something you can ALWAYS go back to your last saved position (Because it is
  12603.   saved automatically).  You can then replay the turn over and over again
  12604.   to figure out exactly what it is that is triggering the bug.  This should
  12605.   greatly benefit playtesters the world over.
  12606.  
  12607. * IMPLEMENTED all of Frédéric's spell-description corrections/clarifications
  12608.   for all spells beginning with the letters A-E.
  12609.  
  12610.  
  12611. ===========================================================================
  12612. * BUG: Disrupt drains the intelligence of creatures which are your allies.
  12613.   NOW FIXED.
  12614.  
  12615. This seems like a good time to vote on the Disrupt spell:
  12616.  
  12617. This spell causes a momentary lapse of vision in all enemy
  12618. creatures. It can prove fatal to weak minded creatures and causes permanent
  12619. damage to the cerebral cortex of those that survive.  This spell currently
  12620. does not affect wizards, growths, inanimate objects or scrolls.
  12621.  
  12622. Frédéric has proposed that Disrupt should be changed to affect
  12623. wizards.  Do you have an opinion on this?
  12624.  
  12625. You can vote for, against, or no opinion.  Or whatever you want 8)
  12626.  
  12627.  
  12628. New Zealand makes this statement:
  12629. My general opinion is that it should be difficult to kill wizards
  12630. with "at a distance" type spells. I know there are other execeptions
  12631. to this already, e.g. curse.
  12632.  
  12633. However, since the disrupt spell is relatively rare, I don't see a
  12634. problem with making the change. It is definitely best to have it
  12635. not affect growths, since otherwise it would kill most of them.
  12636.  
  12637.  
  12638. Hungary has this to say:
  12639. After I've searched what does it mean the "cerebral cortex" expression, my
  12640. opinion is the follow:
  12641.  
  12642. If it is the same like brain drain, but it has effect on the whole playing
  12643. area, I say: OK, let it has affect on the wizards and all object (all means
  12644. EVERYTHING). Let's rise up the CHAOS!!!!
  12645.  
  12646. JC replies:
  12647. Since the description says it affects the cerebral cortex it should only
  12648. affect creatures.  Inanimate objects and growths do not have a cerebral
  12649. cortex.  Technically this spell should not affect the Robot, but that is
  12650. an issue for another time 8)
  12651.  
  12652. I feel that since the spell does not require line of sight and since it
  12653. already affects huge numbers of enemies I am mostly against applying its
  12654. damage to wizards.
  12655.  
  12656. If you are playing a game against 7 enemy wizards and each wizard has 4
  12657. creatures on the board then casting Disrupt will damage 28 enemy creatures!
  12658. Isn't that enough?
  12659.  
  12660. Also you don't have to pick a particular enemy to damage.  It just damages
  12661. ALL enemy creatures.  Therefore I am mostly against the proposal.
  12662.  
  12663. However, since the spell only does 2 points of damage to intelligence
  12664. combined with the fact that it is very rare, I'm not totally against it.
  12665. Thus I vote -.75 points.
  12666.  
  12667.  
  12668.  
  12669. France votes FOR this proposal:              +1.0  point
  12670. New Zealand votes Neutral/For this proposal: +0.5  points
  12671. Ireland abstains:                             0.0  points
  12672. USA votes +1, -.75                           +0.25 points
  12673. -------------------------------------------------------------
  12674.                                       TOTAL: +1.75 points
  12675.  
  12676. Proposal Passes and is implemented on May 20th, 2000
  12677. ==========================================================================
  12678.  
  12679. * Created a MakeDemoOfChaos.txt AmigaDos script file to copy all the files
  12680.   needed to create a playable Chaos distribution into a Chaos/ dir.
  12681.   I actually used this to make a registered version of Chaos 2.81.  DONE.
  12682.  
  12683.  
  12684. Version 2.81 installed on JJ's computer on Monday, May 22nd, 2000.
  12685.  
  12686. END OF VERSION 2.81
  12687.  
  12688. BEGIN VERSION 2.82 International Language Version.
  12689.  
  12690. * IMPLEMENTED all of Frédéric's spell-description corrections/clarifications
  12691.   for all spells beginning with the letters F to Z.  Including complete
  12692.   rewrites of Magic Attack, Magic Bolt, Ice Breath, Lightning, X-Ray and
  12693.   Fireball.  DONE.
  12694.  
  12695. * CHANGED Pythons so they attack Life Force + Manuverability.
  12696.  
  12697. * ADDED a new "Language" menu option with English, Français, Hungarian,
  12698.   Deutsch, Español and Italiano options.  All options are mutually
  12699.   exclusive.
  12700.  
  12701. * BUG: Hold down the RMB.  Now select any language then select another
  12702.   language (DO NOT RELEASE THE RMB DURING THIS TIME).  The 2nd language you
  12703.    selected will be correctly highlighted and the 1st language will be
  12704.    correctly unhighlighted.  But internally the program still only knows that
  12705.    you selected the 1st language, thus the Language variable is now set to the
  12706.    WRONG value!  Ok, after some hours studying the RKRMs I worked out how
  12707.    to handle multiple selections in 1 MenuHandler() call.  NOW FIXED.
  12708.  
  12709. * Above fix has hopefully now prevented numerous other Menu problems from
  12710.   ever happening.
  12711.  
  12712. * ADDED some text to print when a promotion happens.
  12713. * ADDED some text to print when an Orc/Goblin/Troll gets a bow.
  12714. * ADDED some text to print when the game is AutoSaving.
  12715.  
  12716.  
  12717. -------------------------------------------------------------------
  12718. JJ complaints on May 25th, 2000:
  12719. 1: Range Boost didn't work on his Wizard with a Magic Bow.  NOW FIXED.
  12720. 2: He doesn't like the digital sound effects and wants a "Combat Sounds"
  12721.    on/off feature.  This took me 2 hours.  1 hour to do it and and 1 hour
  12722.    to debug it due to lame C STUPIDITY.  I wrote IF (MENUCombatSound)
  12723.    and the compiler generated NO ERRORS!  But there is no variable called
  12724.    MENUCombatSound!!!!!  And it didn't call the FUNCTION
  12725.    MENUCombatSound() either!  It just always evaluated the nonexistent
  12726.    variable as TRUE so the sounds were ALWAYS ON no matter what I did.
  12727.    NOW FIXED.
  12728. 3: The graphics on the info panels on his A3000 are in different
  12729.    proportions to the graphics on the main screen. He doesn't like this.
  12730.    This is due to limitations of the A3000 graphics chips, sorry.
  12731.  
  12732.    You can either:
  12733.    A) Redesign all 1000 graphics in the game by doubling their size
  12734.       vertically and then hand editing them to smooth out the resulting
  12735.       blockiness.  Assuming you can edit 5 graphics per hour this should
  12736.       take only 200 hours.
  12737.    B) Buy an Amiga 4000 or a suped-up Amiga 1200.
  12738. -------------------------------------------------------------------
  12739.  
  12740. * INTERNATIONAL LANGUAGE SUPPORT ADDED!  (Only for Spell Descriptions)
  12741.   IT WORKS GREAT!  Currently the only languages supported are English,
  12742.   Français and Hungarian.  The font still needs to be edited to contain
  12743.   accented characters, this is Frédéric's department.
  12744.  
  12745. * ELIMINATED all those stupid spell+1 and spell-- and spell+=1 constructs
  12746.   from SpellInformation().  This was all caused by PoolPos requiring a
  12747.   spellnumber-1 instead of a real spellnumber!  NOW ALL FIXED!
  12748.  
  12749. * ENFORCER HIT BUG!  Selecting "Scores" from the Menu somehow corrupts the
  12750.   value of the Global Variable "Language" and sets it to 8.  Then anything
  12751.   that uses the Language variable to access an array triggers off enforcer
  12752.   hits.  Hmmm... this was all caused by a missing break; after a
  12753.   END_SWITCH.  I guess most END_SWITCH statements need a break; after them.
  12754.  
  12755. * Wolverines now scavenge +3.
  12756. * Achiyalabopa now needs LOS for its sight range due to the fact that it is
  12757.   "low-flying".
  12758.  
  12759. * Wednesday, May 31st, 2000: Installed version 2.82 onto JJ's computer.
  12760.   My optical drive got tons of write-errors and it was a major problem to
  12761.   copy the game onto it.  I don't know what I will do for the next version
  12762.   :(
  12763.  
  12764. BEGIN version 2.83: Continuation of International Language Version.
  12765.  
  12766. * Hidden Horror + Reincarnation Bug Report by Frédéric:
  12767.   I had cast reincarnation on my hidden horror so as to get a golden dragon
  12768.   when it came close to that combat-enhanced enemy wizard (like this is said
  12769.   in the hidden horror description), but I only got a red dragon.
  12770.   NOW FIXED.
  12771.  
  12772. * Added in some code to read in all the catalog files.
  12773.  
  12774. To preserve file attributes on extracted lzx files type the following:
  12775. lzx -a x filename
  12776. lzx -a x filename dirname
  12777.  
  12778.  
  12779. * REPLACED most of the text in the game with an appropriate call to
  12780.   Message() which gives the correctly translated string according to the
  12781.   currently selected language.
  12782.  
  12783. * PROOFREAD, corrected & edited Frédéric's new doc sections on creature
  12784.   statistics and spell statistics.
  12785.  
  12786. =========================================================================
  12787. Begin Catalog Translation Problems
  12788. =========================================================================
  12789.  
  12790. Ok now I've had some serious problems over the last few days.
  12791. #1: French grammar is backwards when compared with English grammar so my
  12792. catalogs are useles.  But the solution is VERY easy, simply make use of the
  12793. new sprintf() (or related) routine in the Amiga OS that allows the
  12794. translator to switch the orders of the parameters around using positional
  12795. notation such as %1$s %2$s %3$ld.
  12796.  
  12797. #2: Well great, the only way I can figure out to use the new sprintf
  12798. in Amiga.Lib instead of the SASC sprintf is to link with Amiga.lib first.
  12799. But this is TOTALLY unacceptable because then the Amiga.lib printf would
  12800. replace the SASC printf and the amiga.lib version is totally bugged and
  12801. lame and worthless.
  12802.  
  12803. #3: Amiga.lib sprintf doesn't support many of the features of "real"
  12804. sprintf routines in C compilers.  For example it doesn't have floating
  12805. point support. :(
  12806.  
  12807. #4: Amiga.lib sprintf is lame and expects 16-bit ints.  Ack.  So all %d and
  12808. %c must be changed to %ld and %lc to compensate for this.
  12809.  
  12810.  
  12811. SOLUTION:
  12812. #1: We will have to continue to use the SASC sprintf for floating point
  12813. formatting and possibly other types of formatting.  The sprintf statements
  12814. using floating point will have to be broken apart into multiple steps.
  12815. Fortunately there is only 1 place in the game that uses a floating point
  12816. number in a translation string.  So this will be dead easy.  The other
  12817. floating point uses of sprintf are purely numerical and will not be
  12818. translated in a catalog file.
  12819.  
  12820. #2: I will implement a new JCsprintf routine which uses the totally cool
  12821. positional notation of AmigaOS RawDoFmt() and amiga.lib sprintf, etc.  I
  12822. thought about calling it Sprintf but I figure we might get them mixed up, I
  12823. couldn't really decide what to do about this...  Maybe we should call it
  12824. Tsprintf since it is only required for use with strings which are being
  12825. translated from 1 language to another.
  12826.  
  12827. #3: This new Tsprintf routine is simply an asm routine that calls
  12828. RawDoFmt() with a function parameter to store the chars in a buffer.  WHY
  12829. OH WHY doesn't RawDoFmt() default to sprintf string-storing when supplied
  12830. with a NULL function parameter?
  12831.  
  12832. This asm routine came straight out of the RKRM example listed under
  12833. RawDoFmt()
  12834.  
  12835. This should solve all the _current_ translation problems.  Other
  12836. translation problems will be dealt with later.
  12837.  
  12838. * I went through and added numeric positioning information to EVERY string
  12839.   that had more than 1 parameter.
  12840.  
  12841. * I basically copied the prototype from sprintf() in stdio.h to use as the
  12842.   prototype for Tsprintf().  Though first I compiled the game as a test
  12843.   with no prototype for Tsprintf() and no warnings or errors were generated!
  12844.   I assumed the game would just crash so I didn't try to play it like that
  12845.   till added the prototype and did smake clean smake.
  12846.  
  12847. =========================================================================
  12848. End Catalog Translation Problems
  12849. =========================================================================
  12850.  
  12851.  
  12852. --------------------------------------------------------------------
  12853. Begin Handling Translated Spellnames
  12854. --------------------------------------------------------------------
  12855.  
  12856. Decide how to handle spellnames?  Why not handle it exactly the same as I
  12857. handle Message(); ?  Yes, exactly like I handle Message, excellent.
  12858.  
  12859. Ok, but how do I read them in?
  12860. If I could somehow make a list of all English spellnames.  This is easy
  12861.  
  12862. duh.  I have a list of all English spellnames.  Its built into the game!
  12863. creature_name[]!!!!!!
  12864.  
  12865. IF (the date of the directory "SpellDescriptions/English" > the date of SpellDescriptions/EnglishSpellnames.txt) THEN
  12866.   just do "list SpellDescriptions/English/ quick files nohead >SpellDescriptions/EnglishSpellnames.txt"
  12867.   I now have a .txt file of all English spellnames.
  12868. END_IF  // ALL DONE NOW.  I just copied code from handling the sound effects.
  12869.  
  12870. Above paragraph is all useless!  I need French names of OBJECTS in the game,
  12871. not french names of english names.
  12872.  
  12873.  
  12874.  
  12875. Now go through each name in the this list and open up
  12876. that filename in each language/ dir and dig out the language/ version
  12877. of it and put it into an array!  Easy!  DONE.
  12878.  
  12879.  
  12880. * Make a CreatureName() macro that returns the creature_name of the
  12881.   creature in the currently selected language.  DONE.
  12882.  
  12883. * Go through the entire game and replace all appropriate occurrences of
  12884.   creature_name[x] with CreatureName(x) except the ones in editor.c.
  12885.   I'll worry about that later.  Certain occurrences of creature_name[x]
  12886.   specifically must NOT be replaced because they are dealing with files
  12887.   (sound files, text files, etc.) and those files must always be named
  12888.   according to their english name.  DONE.
  12889.  
  12890. Check the date of the LanguageSpellnames.txt against the date of the 
  12891. dir Language/  If the dir is newer then it means something has changed and
  12892. the text files must be rebuilt.  So if the Language/ dir is newer than the
  12893. LanguageSpellnames.txt file or the EnglishSpellnames.txt file or the
  12894. English/ dir then it must be rebuilt.  Additionally, if the English .txt
  12895. file  gets rebuilt then they must ALL get rebuilt because it might mean
  12896. some new spells have been added.
  12897.  
  12898. So in the end I'll end up
  12899. with a 350 line FrançaisSpellnames.txt
  12900. and  a 350 line MagyarSpellnames.txt
  12901. etc.
  12902.  
  12903. Line 1 is the translated name of object 1.
  12904. Line 2 is the translated name of object 2.
  12905. etc.
  12906.  
  12907. * PROBLEM: It takes several seconds to open/read/close the 350 files
  12908.   required to read in the translated spellnames. (And its only doing Français
  12909.   now!  That will be over a whole minute when all languages are done.)
  12910.   So I optimized it such that the list only needs to be rebuilt if someone
  12911.   has changed something in one of the descriptions.  NOW FIXED.
  12912.  
  12913. * TRANSLATED SPELLNAMES ARE NOW FULLY FUNCTIONAL.
  12914. --------------------------------------------------------------------
  12915. End Handling Translated Spellnames
  12916. --------------------------------------------------------------------
  12917.  
  12918. * Changed "Hungarian" -> "Magyar".
  12919.  
  12920. ----------------------------------------------------------------------
  12921. Email from Frédéric
  12922. ----------------------------------------------------------------------
  12923. Too bad my stupid screen grabber overwrote the screen grab I made earlier,
  12924. it was very impressive ! I played with 30 scrolls and my wizard appeared
  12925. next to a fir with combat on his spell list. With the help of a stone giant
  12926. I destroyed the tree and it revealed a Chaos lord spell !! I cast it then
  12927. replicated (with triple active) myself. I destroyed 4 generetors and 2 enemy
  12928. wizards in only one turn :-) !! I had to pick 6 spells among a big list, and
  12929. there was 1 Generator and 2 touch of God spells in it !  I was awesomely
  12930. powerful.
  12931.  
  12932. Then I made a stupid mistake. One of my replicates got burried by an orange
  12933. jelly. I rescued him but forgot he was only at half of his _initial_
  12934. strength. He got killed by a stone golem next turn. And it was my main
  12935. wizard so I lost.
  12936.  
  12937. One thing I don't understand is how it is decided which wizard is the
  12938. casting wizard. It seems to change each turn. Is it random ?
  12939.  
  12940. Reply from JC:  The spell description warns that casting Replicate on one's
  12941. own self can be very disorienting.  It means what it says. 8)
  12942.  
  12943. ----------------------------------------------------------------------
  12944. End Email from Frédéric
  12945. ----------------------------------------------------------------------
  12946.  
  12947. * June 13th, 2000: Received Patrick's 2nd registration from Ireland.  YAHOO!
  12948.   Compiled v2.83 and Emailed it to him on June 15th, 2000.
  12949.   
  12950.   The actual size is about 8.18 megs.
  12951.   The .lha archive size is about 5 megs and
  12952.   the email size is about 6.6 megs.
  12953.  
  12954. * June 17, 2000: Received Frédéric's registration.  He is now inducted as a
  12955.   junior member of Team Chaos and assumes all privileges and
  12956.   resposonsibilities associated therewith.
  12957.  
  12958.   He is also Chief Executive Vice President in Charge of Français
  12959.   Translation, Français Font Editing and also English and Français
  12960.   AmigaGuide Electronic Hypertext Documentation.
  12961.  
  12962. Saturday, June 17th, 2000: I loaded my very first IFF graphic file into the
  12963. game and displayed it.  AMAZING!  All these years I've never once loaded a
  12964. graphics file into one of my programs!  Though I have loaded IFF _sound_
  12965. files for many many years.
  12966.  
  12967. **********************************************************************
  12968. Bug Reports from Frédéric:
  12969. **********************************************************************
  12970.  
  12971. * Saving does not work ! I launched Chaos from the shell and got
  12972.   messages like
  12973.   c/lha: unknown option - 3
  12974.   each time the game tried to save the current game (either autosave or
  12975.   requested save).
  12976.  
  12977.   I've finally found why lha complains about the -3 option: it was in my
  12978.   ENV:LHAOPTS file, to automatically select the best compression algorythm.
  12979.   However, the old lha version supplied with chaos does not know of this
  12980.   option. The ideal solution would be that you use the -I option when you
  12981.   call lha from Chaos, this will cause lha to ignore the LHAOPTS environment
  12982.   variable.
  12983.  
  12984. JC: Ok, I changed lha to use -qaI when being called from Chaos.  NOW FIXED.
  12985.  
  12986.  JC>> * I tried to reactivate the lhaopts environment variable but the
  12987.  JC>> problem about -3 option arose again. Maybe you should put the -I
  12988.  JC>> option before all other options and alone on its dash.
  12989.  JC> Please try using the lha that is in chaos/c/ and figure out how to make
  12990.  JC> it work.
  12991.  JC> Just type it from the shell and try different options and settings
  12992.  JC> until it works properly. Then let me know which combination of things
  12993.  JC> worked and I'll put it in the program.
  12994.  
  12995. When I say "c/lha" I get "invalid option -3".
  12996.  
  12997. When I say "c/lha -I" I have the usage summary.
  12998.  
  12999. I said "c/lha -Ir a ram:ChaosTest.lha AmigaToPAL" and it worked.
  13000.  
  13001. I think the problem is that you mixed options and commands. -Iq are options,
  13002. a is a command "add", not to be mixed with the -a option (preserve file
  13003. attributes). So the following will work:
  13004.  
  13005. c/lha -qaI a xxxAutosave.lha ChaosSavedGame
  13006.  
  13007. (at least it should). Drat ! I tested it and it doesn't :-(
  13008.  
  13009. Okay, when I move -q aside it works:
  13010.  
  13011. c/lha -aI -q a xxxAutosave.lha ChaosSavedGame
  13012.  
  13013. JC: Ok I have now implemented the above line into the autosave code of the
  13014. game.  It doesn't work!  Lha keeps warning me that the "I" option must
  13015. appear immediately after a - and before the archive name!
  13016.  
  13017. c/lha -I -aq a xxxAutosave.lha ChaosSavedGame
  13018.  
  13019. NOW FIXED.
  13020.  
  13021.  
  13022. * I cast abduction and it abducted a poison dagger scroll ! And it did
  13023.   reveal itself as I was trying exploration mode :-)
  13024. JC: NOW FIXED
  13025.  
  13026.  
  13027. * The proportionnal font you use in the info screens does not know of
  13028.   accented letters !! This makes french descriptions for spells totally
  13029.   unreadable ! For example "Dévastation" becomes "Dvastation" !
  13030.  
  13031. JC: I know all about this.  You are in charge of translation so you are
  13032.       supposed to fix this.
  13033.  
  13034. NOW FIXED.
  13035.  
  13036.  
  13037. * The special combat ability provided by Aesculapius does not target
  13038.   anything ! I think special combat should have a default stat target even if
  13039.   the creature has no special combat at all (like range combat). Moreover
  13040.   this special combat targets my own creatures too !
  13041.  
  13042. JC: This was a simple problem of not enclosing my #define in ()
  13043.     NOW FIXED.  Aesculapius no longer gives people Special Combat.
  13044.  
  13045.  
  13046. * "Independent vulture eats some brown bear cadaver. Life +d"
  13047.   Seems the %d thing does not work.
  13048.  
  13049. JC: This is a problem with that stupid OS sprintf not working with long
  13050. parameters.  It only works with words!  It has already caused me many many
  13051. problems and this is the whole reason why it took me soooo long to do the
  13052. translation coding.  Anyway this particular sentence is NOW FIXED.
  13053.  
  13054.  
  13055. * I got this error message too:
  13056.   ChaosDigitalSoundSubProcess : erreur code 150
  13057.  
  13058. JC:  You can ignore this one.  All it means is that Chaos tried to play a
  13059. sound effect when there were no channels available (like when the music was
  13060. playing).  If music had been off at that moment, the sound would have
  13061. played.  The actual error message is generated by the OS and there is no way
  13062. for me to suppress it.
  13063.  
  13064.  
  13065. * I've found another minor bug: when I cast alternography and restart the
  13066.   game, the alternography is not reset and remains active.
  13067. JC: NOW FIXED
  13068.  
  13069. * "Asleep's wizard munches on some manticore's cadaver. Life +d." Asleep's
  13070.   wizard ??? This should not exist (it is not a fake wizard)! Moreover, asleep
  13071.   creatures should not eat anymore !
  13072. JC: Well, there was a bug whereby any scavenger that was asleep or dead or
  13073. a scroll would still scavenge any dead bodies that it was on top of.
  13074. NOW FIXED.
  13075.  
  13076.  
  13077. --------------------------------------------------------------------------
  13078. * Providing someone with a telescope does not increase his mapping of his
  13079.   own position in the world until he moves. Too bad if that creature is
  13080.   engaged. Maybe the telescope spell should update the explored cell for the
  13081.   recipient creature. This update should also happen when a creature blocking
  13082.   line of sight moves, revealing some parts of the world. Maybe a good place
  13083.   to do this is board update.
  13084.  
  13085. Reply from JC:
  13086. #1: Its a rule: if you are engaged then you can't map the world.  You are
  13087. too busy defending yourself to have time to draw maps.
  13088.  
  13089. #2:  Furthermore its a rule that if your creature doesn't move then it
  13090. doesn't map anything.  Thus, a creature that never moves will never map
  13091. anything.
  13092.  
  13093. #3:  I have been thinking of changing the Telescope and Seismology spells
  13094. such that they give results immediately upon casting.  Since you asked for
  13095. this I went ahead and implemented it.
  13096.  
  13097. So from now on if you cast Telescope or Seismology you will IMMEDIATELY (in
  13098. the casting phase) map new areas.
  13099. --------------------------------------------------------------------------
  13100.  
  13101.  
  13102. **********************************************************************
  13103. End Bug Reports from Frédéric.  (Is there ever an end? 8)
  13104. **********************************************************************
  13105.  
  13106.  
  13107. * FIXED description of Solar.
  13108.  
  13109. * CHANGED: Aesculapius scrolls are now always buried.
  13110.  
  13111. * CHANGED: Touch of God, Chaos Lord, Iridium Horse and Aesculapius scrolls
  13112.   are now only 1/3 as probable as other scrolls.
  13113.  
  13114.  
  13115. * END of Version 2.83
  13116. * BEGIN Version 2.84
  13117.  
  13118. * CHANGED Cartography to immediately explore the cells during the casting
  13119.   phase in the same way that I already changed Telescope and Seismology.
  13120.  
  13121. * INSTALLED the new ChaosCalligraphy.font which has been modified by
  13122.   Frédéric to include (all?) international characters of Western European
  13123.   alphabets.  Most notably ¿¡ñÑ éèêëæ ÉÈÊËÆ çÇ etc.
  13124.  
  13125. **********************************************************************
  13126. Bug Reports from Frédéric:
  13127. **********************************************************************
  13128.  
  13129. > * I cast betrayal on a bolter wall and it said the spell succeeded. But the
  13130. > bolter wall still belonged to the same player.
  13131.  
  13132. JC:  This has always been possible.  If Betrayal succeeds then a new player
  13133. is randomly chosen.  In your case it randomly chose the same player as
  13134. before.
  13135.  
  13136. I have now changed it so that if the spell succeeds then the target
  13137. _WILL_ change owners.  NOW FIXED.
  13138.  
  13139.  
  13140. > * Sometimes the old EndOfTurn sound is played at the end of a turn, instead
  13141. > of the sound from file "EndTurn.8svx". I did not find a condition for this
  13142. > to happen.
  13143.  
  13144. JC: This happened only when someone had previously cast Move It. 
  13145. NOW FIXED.
  13146.  
  13147. * When I begin a game in exploration mode (as player 1 or 8, never mind),
  13148.   the position of player 3 is shown to me before disappearing again. ?
  13149. JC: This one took me a while to figure out.  In the beginning of the game I
  13150. changed the PlayerView to 15 so that way absolutely nothing would be shown
  13151. since there is no player 15.  But the Team[] only has 12 elements! (0-11)
  13152. so Team[15] was actually accessing into TeamSettings[3] (which keeps a
  13153. backup copy of the team settings so that alliances and seperations don't
  13154. mess up the setup screen)  Of course TeamSettings[3] is going to equal 3
  13155. unless you change the Teams on the setup screen.  So the game thought that
  13156. player 15 was on Team 3 and thus would show you player 3's position at the
  13157. start of the game.
  13158.  
  13159. So how do I fix this?
  13160. A: Expand the Team[] and TeamSettings[] array.
  13161.    This requires a change to the savegame format and I would have to
  13162.    convert all the old levels to the new format.
  13163. B: I could just not change the view to be 15 at the beginning.  I could
  13164.    change it to the 1st human player, (since he will get the 1st real
  13165.    view anyway) or I could change it to the DEADP player.
  13166.  
  13167. Option B is easiest.  I will just change the view to the DEADP player.
  13168. This will work perfectly until the game starts randomly distributing dead
  13169. bodies across the map at the beginning of the game.  This will probably
  13170. never happen so it should never be an issue.  NOW FIXED
  13171.  
  13172.  
  13173. > * A question about something I wanted to test but I didn't have the right
  13174. > spells on my list. What does an inanimate object becomes when it has been
  13175. > hit by stone to flesh and reincarnate, and then dies ? Does the
  13176. > reincarnation scheme take this into account ?
  13177.  
  13178. JC: I tried this and it worked.  It said R=0 meaning that it doesn't
  13179. reincarnate into anything.  I then killed it and it died as usual.  Nothing
  13180. messed up, no crashes, my computer is still running.  8)
  13181.  
  13182.  
  13183. > * I cast the cat lord, and I had already a lion. I was able to control the
  13184. > lion and attack a harpy with it. Then, after I clicked end-of-turn, the cat
  13185. > lord controlled the lion and attacked the harpy again.
  13186.  
  13187. NOW FIXED.
  13188.  
  13189.  
  13190. > * My wizard has scavenge +4 but does not scavenge the harpy cadaver he's
  13191. > standing on (autosave 020p8). Ah ! I see. Scavengerism is only for
  13192. > creatures with a life force below its initial value, right ?
  13193.  
  13194. Correct.
  13195.  
  13196.  
  13197. > * Another wizard has scavengerism and it works. But he's cloaked and the
  13198. > sentence say he is a wizard munching on some brown bear carcass. I think it
  13199. > should say "cloaked creature" instead of wizard.
  13200.  
  13201. NOW FIXED.
  13202.  
  13203.  
  13204. > * A leopard corpse mewed when it was destroyed by a fireball ! Corpses
  13205. > really shouldn't make any sound :-)
  13206.  
  13207. NOW FIXED.
  13208.  
  13209.  
  13210. > * I'm able to control the solar and make it attack before it attacks on his
  13211. > own !
  13212.  
  13213. NOW FIXED.
  13214.  
  13215. ========================================================================
  13216. BEGIN HORRIBLE LOCKUP BUG WITH "Repulsion" sound.
  13217. ========================================================================
  13218. * Sometimes the game locks up and makes the Repulsion sound.
  13219.  
  13220. JC: This same bug was reported by JJ several times over the last few months
  13221.     but the details were so sketchy that I had no way to track it down and
  13222.     fix it.
  13223.     10 days later after countless hours of playtesting by Frédéric using
  13224.     the JC modified version of Chaos which generates logfiles of its
  13225.     actions, I was _finally_ able to track down this horrible bug!!
  13226.  
  13227.  
  13228. // Begin code copied from CellEffect();
  13229.   case TELEPORTIN:
  13230.      ObtainSemaphore (&BoardLock);
  13231.      FOR (i = 0; i < 8; i++) DO
  13232.         IF (i != 7) THEN
  13233.            SetAPen (rastPort, WHITE);
  13234.            Move (rastPort, x + i, y + i);
  13235.            IF (DrawIt) Draw (rastPort, x + CellWidth - i, y + i);
  13236.            AUDIONote (2000 - i * 100);
  13237.            IF (DrawIt) Draw (rastPort, x + CellWidth - i, y + CellHeight - i);
  13238.            AUDIONote (1000 + i * 100);
  13239.            IF (DrawIt) Draw (rastPort, x + i, y + CellHeight - i);
  13240.            AUDIONote (2000 - i * 100);
  13241.            IF (DrawIt) Draw (rastPort, x + i, y + i);
  13242.            AUDIONote (1000 + i * 100);
  13243.         END_IF
  13244.         IF (i != 0) THEN
  13245.            SetAPen (rastPort, BLACK);
  13246.            Move (rastPort, x + --i, y + i);
  13247.            IF (DrawIt) Draw (rastPort, x + CellWidth - i, y + i);
  13248.            IF (DrawIt) Draw (rastPort, x + CellWidth - i, y + CellHeight - i);
  13249.            IF (DrawIt) Draw (rastPort, x + i, y + CellHeight - i);
  13250.            IF (DrawIt) Draw (rastPort, x + i, y + i++);
  13251.         END_IF
  13252.      NEXT // i++
  13253.      ReleaseSemaphore (&BoardLock);
  13254.      break;
  13255. // End code copied from CellEffect();
  13256.  
  13257. Notice that it always decrements i (i--) but it only SOMETIMES
  13258. reincrements it (i++)
  13259.  
  13260. As i happens to be the loop control variable, decrementing it once per loop
  13261. = an infinite loop!
  13262.  
  13263. I spent hours looking through the code for constructs like this!!!!
  13264. I SPECIFICALLY looked for ANY FOR NEXT loops in which the loop control
  13265. variable was changed via i++, i--, --i, ++i, or i+=x or i-=x.  But I didn't
  13266. look in cell.c because I thought the problem was either in chaos.c where
  13267. the recovery code is or in core.c where tons of low-level routines are at
  13268. that get called millions of times by chaos.c.
  13269.  
  13270. NOW FIXED.
  13271.  
  13272. What the actual bug was:
  13273. Basic Explanation: Anything that caused the TELEPORTIN or TELEPORTOUT cell
  13274. effects to be used would lock up in an infinite loop making sound.  Since a
  13275. simple sound played in a loop is what the "Repulsion" sound is, this sounds
  13276. very similar to the Repulsion spell sound.
  13277.  
  13278. Specific Explanation:
  13279. IF you were playing in exploration mode and any of the following things
  13280. happened then the game would lock up.
  13281. A) A roper teleported to a new location.
  13282. B) A creature changed sides due to impurities.
  13283. C) Any Wizard used the Passage spell.
  13284. D) Any Wizard used the Teleport spell.
  13285. E) Any wizard cast Pyrotechnics or Storm and it actually hit a creature.
  13286. F) Any Haunt spontaneously changed sides.
  13287. G) Any Wizard cast the Pox spell on something.
  13288.  
  13289. NOW FIXED!!!
  13290.  
  13291. So the reason the lockup bug seemed to only happen when you played with
  13292. lots of enemy wizards and with growths on the screen was because, the more
  13293. stuff on the board, the more of a chance of Impurities causing an alleigance
  13294. change.
  13295.  
  13296. ========================================================================
  13297. END HORRIBLE LOCKUP BUG WITH "Repulsion" sound.
  13298. ========================================================================
  13299.  
  13300. * BUG: When I'm in alliance with another wizard, I can see the regions he
  13301.   has explored. However, when a creature is moving in these regions, it
  13302.   is not highlighted.
  13303. JC: This bug was a simple typographical error in the code.  NOW FIXED.
  13304.  
  13305.  
  13306. > * About the bug in inamorphobiosis you fixed. I thought the same problem
  13307. > could arise when a wizard mounts a cat (lion, jaguar etc) thanks to "Mount"
  13308. > and another player casts the cat lord. Did you consider this case ?
  13309.  
  13310. JC: I just changed it so that Cat Lords cannot take control of mounted cats.
  13311.     NOW FIXED.
  13312.  
  13313.  
  13314. > * After Joker, I got "Wizard 7" on my list ! Is this normal ?
  13315.  
  13316. JC: Well, the way Sean programmed it, it could give you any spell, even spells
  13317. with 0 probability.  I have now changed it so that it will not give you
  13318. spells of 0 probability.  NOW FIXED.
  13319.  
  13320. You also reported months ago that you were able to get a Radioactive Land
  13321. spell on your list by casting Joker in v2.5.  This was a symptom of the
  13322. exact same bug and is also NOW FIXED.
  13323.  
  13324.  
  13325. > * I had triple in effect and my marid cast violet fungi. It logically cast
  13326. > it three times, but all at the same place, one on another. This should be
  13327. > considered stupid !
  13328.  
  13329. JC: NOW FIXED.
  13330.  
  13331.  
  13332. > * I first got Burstroem's Browser today. I cast it and began to peek at
  13333. > other wizards spell lists. When I play with Texas Trash'em, I can peek at
  13334. > others spell list when I have already picked a spell to cast and the game
  13335. > is waiting for me to discard another one. However, when I get back to my
  13336. > list, the spell I had picked to cast is displayed again.
  13337.  
  13338. JC: NOW FIXED.
  13339.  
  13340.  
  13341. > * When a growth is hit with "No grow", it becomes inanimate, so the
  13342. > animation should be stopped.
  13343.  
  13344. JC: NOW FIXED.
  13345.  
  13346. **********************************************************************
  13347. End Bug Reports from Frédéric.  (Is there ever an end? 8)
  13348. **********************************************************************
  13349.  
  13350. * CHANGED: Each Wizard now has a unique name!  Instead of 8 creatures with
  13351.   the name "Wizard", we now have "Wizard 1", "Wizard 2" etc.  This was
  13352.   neccessary so that each wizard can have its own unique sound files and
  13353.   graphic files.
  13354.  
  13355. * BUG: A scroll of a Cat Lord takes control of the cats and makes them
  13356.   belong to NOBODY!  NOW FIXED.
  13357.  
  13358. * CHANGED: Inanimage is now only half as likely to cast Inanimorphobiosis
  13359.   or Mass Petrification as he is likely to cast any of his other spells.
  13360.  
  13361. Sent new version of 2.84 to Frédéric for playtesting on July 5, 2000.
  13362.  
  13363. * CHANGED Ghoul: The description of the Ghoul says that it feeds on others
  13364.   so I have now changed it so that it has Exophagy and +2 Scavenging as per
  13365.   Frédéric's request.
  13366.  
  13367.  
  13368. **********************************************************************
  13369. Double-Attacking Bug Reports from Frédéric:
  13370. **********************************************************************
  13371.  
  13372. >>> * A floating eye belonging to one of my computer allies was hit by
  13373. >>> singular earthbind. It moved close to an enemy and attacked it... two
  13374. >>> times !
  13375.  
  13376. > * The ghoul in cell (3,3) attacked the independent generator twice !!! This
  13377. > is the first time I see this ! Autosaves 27 and 28. It did it again on turn
  13378. > 28 !
  13379.  
  13380. > * Another ghoul, in the upperright corner, attacked the adjacent ogre
  13381. > assassin twice ! Autosaves 39 and 40. It just killed the ogre now and got
  13382. > back to its original place. So it really gets two chances to move!
  13383.  
  13384. Yes quite right.  Any nonengaged computer-controlled creature with >10
  13385. movement points could move twice!  NOW FIXED.
  13386.  
  13387. **********************************************************************
  13388. End Double-Attacking Bug Reports from Frédéric.
  13389. **********************************************************************
  13390.  
  13391. * BUG: Independent creatures and the creatures of computer-controlled
  13392.   wizards get to move and/or attack twice if they have more than 10
  13393.   movement points and are not engaged.  NOW FIXED.
  13394.  
  13395. * BUG: Independent creatures and the creatures of computer-controlled
  13396.   wizards accrue approximately .24 free movement points for each diagonal
  13397.   movement made.  NOW FIXED.
  13398.  
  13399. * BUG: A computer-controlled wizard who is mounted on an inanimate object
  13400.   (such as a centaur that has been hit with Flesh to Stone) can still
  13401.   attack and shoot if the centaur is "engaged".  NOW FIXED
  13402.  
  13403. * BUG: Animate affects scrolls of inanimate objects!  NOW FIXED!
  13404.  
  13405. **********************************************************************
  13406. Bug Reports from Frédéric.
  13407. **********************************************************************
  13408.  
  13409. > * I cast "no grow" on my own gooey blob so that I get many creatures when I
  13410. > subsequently cast "animate". However, it didn't work: I still have my
  13411. > petrified gooey blob. We should either: say the spell only works for trees,
  13412. > or make it affect more inanimate objects (including those petrified by
  13413. > flesh to stone, for example make them creatures again).
  13414.  
  13415. JC: I changed it so that now Animate affects petrified growths.  NOW FIXED.
  13416.     Also it didn't affect Ropers.  Now it does.
  13417.  
  13418.  
  13419. > * When the mount of a wizard is killed, it leaves no corpse behind.
  13420. JC: NOW FIXED.
  13421.  
  13422.  
  13423. > * When a creature kills a growth covering a scroll, it does not move over
  13424. >   the scroll.
  13425. JC: NOW FIXED.
  13426.  
  13427.  
  13428. > * Desire: on the second setup screen, add the GFLG_TABCYCLE (cf
  13429. > Intuition/Intuition.h) to the string gadgets so that one can move between
  13430. > all the string gadgets without using the mouse.
  13431.  
  13432. JC: DONE.  I also implemented it on the 1st setup screen.
  13433.     TABCYCLE feature added in honor of Frédéric Delacroix, who earned the
  13434.     "Playtester of the Month Award" for June 2000.
  13435.  
  13436.  
  13437. > * Suggestion: Convert could be cast on the inanimate so that it can be used
  13438. > to destroy dark wood. (An enemy of mine is an arborist and cast a line of
  13439. > dark woods close to me).
  13440.  
  13441. JC: DONE.
  13442.     Convert spell description updated.
  13443.  
  13444.  
  13445. > * There is an independent solar but it never moves or attack !
  13446.  
  13447. JC: NOW FIXED. Tested and works perfectly.
  13448.  
  13449.  
  13450. **********************************************************************
  13451. End Bug Reports from Frédéric.  (Is there ever an end? 8)
  13452. **********************************************************************
  13453.  
  13454. ----------------------------------------------------------------------
  13455. - Begin Font Bugs!
  13456. ----------------------------------------------------------------------
  13457. Font in start/quit gadgets is wrong. It is using a system default font.
  13458. Font in Menus is wrong.  It is using a system default font.
  13459. Font inside the filerequester is wrong.  It is using a system default font.
  13460. Font in text gadgets on setup 1 is Topaz!
  13461.  
  13462. If the system default font is really HUGE, as it might be on an Amiga with
  13463. a 1600x1280 gfx card, then the gadgets are really messed up and the menus
  13464. look HORRIBLE and the menus corrupt the screen gfx.  The gadgets and menus
  13465. are programmed to ask for an 8 point font and they expect to get it.  If
  13466. the font is not 8 points then bad things can happen.
  13467.  
  13468. Ok I just added the following line to the OpenScreenTagList() of the main
  13469. screen:
  13470.   SA_Font,&PearlFont8textAttr,
  13471.  
  13472. THIS DID NOT FIX THE BUG!
  13473.  
  13474. I have now tried multiple other ideas.  None of them had any effect
  13475. whatsoever. :(
  13476.  
  13477. I conducted various experiments and had no luck whatsoever.  So then I
  13478. spend the rest of the day discussing this problem with various Amiga
  13479. Programmers and _FINALLY_ Drad figured out the problem and conducted some
  13480. experiments to prove what was going on.
  13481.  
  13482. 1. OpenDiskFont() can handle, and really should have, a complete pathname
  13483.    in the TextAttr struct. "ChaosGame:fonts/pearl.font" works perfectly.
  13484.  
  13485. 2. But when using that VERY same TextAttr struct in a menu or a gadget, it
  13486.    will fail 100% of the time due to a "bug" or "improperly documented
  13487.    feature" of Intuition.  When supplying TextAttr's to ANY intuition
  13488.    function, there MUST be NO pathname component whatsoever!  And the font
  13489.    MUST exist in memory!  Only the actual name of the font may be supplied.
  13490.  
  13491. So the solution is to have a PearlFont8TextAttrForOpenDiskFont that says
  13492. "ChaosGame:fonts/pearl.font"  and a seperate PearlFont8TextAttrForIntuition
  13493. that says "pearl.font".
  13494.  
  13495. NOW FIXED.
  13496.  
  13497. ----------------------------------------------------------------------
  13498. - End Font Bugs!
  13499. ----------------------------------------------------------------------
  13500.  
  13501. Sent yet another new version of v2.84 to Frédéric for playtesting on 
  13502. July 12th, 2000.  It took approx 41 minutes to compile on my 25Mhz 030.
  13503.  
  13504.  
  13505. **********************************************************************
  13506. Bug Reports from Frédéric.
  13507. **********************************************************************
  13508.  
  13509. > * It seems to me that growths eventually stop growing, sometimes after a
  13510. > single turn.
  13511.  
  13512. JC: NOW FIXED.
  13513.  
  13514.  
  13515. > I have noticed very recently
  13516. > (between 2.83 and 2.84) that some growths tend to stop growing very rapidly.
  13517. > I once cast an orange jelly and it never grew at all !
  13518.  
  13519. JC: NOW FIXED.
  13520.  
  13521.  
  13522. > Sometimes Hippocrates or Aesculapius randomly kills one of my creatures
  13523. > with his healing Special Combat.
  13524.  
  13525. JC: I finally figured this out!  It happened randomly because it was caused
  13526.  by the Impurities code!  Here is the offending line of code:
  13527.  
  13528.   IF (Impurities and MSGRandom() % 800 < 2 and !isExposedWizard(defence)) combat=50;
  13529.  
  13530. I rewrote it thusly:
  13531.   IF (Impurities and MSGRandom() % 800 < 2 and !isExposedWizard(defence)) THEN
  13532.      IF (combat >=0) THEN 
  13533.         combat=50;
  13534.      ELSE
  13535.         combat=-50;
  13536.      END_IF
  13537.   END_IF
  13538.  
  13539. So the real bug was:
  13540. * BUG: With Impurities turned on, healing special combat sometimes kills
  13541.   the creature being healed!  NOW FIXED!
  13542.  
  13543. > * When a creature raised from the dead is covered by a growth and then
  13544. > uncovered, it is living again ! 
  13545.  
  13546. This is according to the rules of Chaos.  If you search the docs for
  13547. "covered by a growth" you will see the rules pertaining to this matter.
  13548.  
  13549. > This is not normal !
  13550.  
  13551. Being undead is not normal!
  13552.  
  13553. If you don't want this to happen then you _must_ kill the growth yourself
  13554. before it dies of natural causes!
  13555.  
  13556.  
  13557. > * When a cloaked wizard who as scavengerism is scavenging a corpse, it says
  13558. > "Wizard 4 munches on a corpse of cloaked creature" !
  13559.  
  13560. This was a simple matter where I switched my variables. NOW FIXED.
  13561.  
  13562.  
  13563. > * Sometimes when a wizard is "killed" by justice/vengeance/exorcise in an
  13564. > unexplored region and is reinstated, his position is revealed (the cell he's
  13565. > in becomes empty for the duration of the "bonus spell" sound).
  13566.  
  13567. This was a bug whereby DrawCell(&NothingImage,cell); was being used instead
  13568. of the correct ReDrawCell(cell);
  13569. DrawCell() just blindly draws graphics into cells without taking into
  13570. account exploration mode.
  13571. ReDrawCell() knows about exploration mode and acts accordingly.
  13572. NOW FIXED.
  13573.  
  13574.  
  13575. > * The wizard that wouldn't die bug:
  13576. > Wizard 5 has 1 life point and -2 recovery. Each time he's attacked, it dies
  13577. > (allelujah sound, but no wizard dying sound). The cell is left blank but the
  13578. > wizard is still there if I move the mouse pointer over it. It can be
  13579. > attacked again and the same happens. The cell is eventually refreshed and
  13580. > the wizard reappears. I think he cast Lich lord during his first life but
  13581. > the lich lord icon is not in the list of his powerups now. He was killed at
  13582. > least 15 times by the independents !
  13583. > Autosaves 15,16,17.
  13584.  
  13585. Ok, this had nothing to do with Lich Lord.  This was caused by the fact
  13586. that the wizard had cast Horror on himself.  Each time he was killed the
  13587. Horror code kicked in and tried to replicate him, but there were no empty
  13588. adjacent cells.  So he wasn't actually replicated and the Horror was not
  13589. actually used up and he didn't actually die.
  13590.  
  13591. I have now changed it such that:
  13592. 1) If this happens again, the Horror gets used up.  So it will only happen
  13593.    once.
  13594. 2) It now prints a text message and does a graphical effect to indicate
  13595.    that the Horror process is happening.
  13596. 3) It sets Life, Magic Resistance, Intelligence, Manuverability and Combat
  13597.    to maximum.  Move gets set to max(CurrentMove,InitialMove). This is to
  13598.    make up for the fact that it didn't get to replicate.
  13599.  
  13600. NOW FIXED.  Tested and works ok.
  13601.  
  13602.  
  13603. > * ????!? The wizard that wouldn't die died on turn 18 ! It was during
  13604. > boardupdate so I guess the giant rat bite did it.
  13605.  
  13606. The wizard who wouldn't die after being attacked multiple times by green
  13607. and golden dragons + tons of other creatures ended up dying by a simple rat
  13608. bite.
  13609.  
  13610.  
  13611. > * When the independents (but it may also happen for other teams, I don't
  13612. > know) kill a wizard, the word "Independents" at the bottom of the screen is
  13613. > erased just after the dying-wizard animation, and the movement phase
  13614. > continues without "Independents" to be reprinted.
  13615.  
  13616. NOW FIXED.
  13617.  
  13618.  
  13619. > * An evil wizard cast meddle but the following creatures were not affected:
  13620. > The exorcist, earth elemental. Is it because they have no reincarnation ?
  13621.  
  13622. Yes.
  13623.  
  13624. > Why wouldn't the exorcist reincarnate into a bandit or an orc ?
  13625.  
  13626. He was set to not reincarnate into anything.
  13627. I have now changed The Exorcist so that he reincarnates into a good little
  13628. Halfling.
  13629.  
  13630.  
  13631. > * A wizard destroyed a white dragon corpse with a magic bolt and the dragon
  13632. > cried ! It's an old bug you told me was allegedly fixed :-)
  13633.  
  13634. OOPS!  I put the "and !isDead(b) and !isScroll(b)" code on 1 of the lines
  13635. that needed it but I forgot to put it on the other line that needed it!
  13636. doh!  NOW FIXED.
  13637.  
  13638.  
  13639. > * The game ended as I killed the last piece of independent earthquake.
  13640. > However, there was still a bird lord alive belonging to a dead player
  13641. > (product of impurities).
  13642.  
  13643. With impurities, you can win the game in an impure manner 8)
  13644.  
  13645. Creatures that belong to dead players are no threat to you whatsoever so
  13646. there is no need to kill them.
  13647.  
  13648. **********************************************************************
  13649. End Bug Reports from Frédéric.  (Is there ever an end? 8)
  13650. **********************************************************************
  13651.  
  13652. * Score Screen has now been translated into Français.  I added in a teensy
  13653.   amount of code for stringwidth sensitivity so that the screen looks good in
  13654.   English and Français.  I'll probably have to add more code when the game is
  13655.   translated to other languages.  I only added in the bare minimum amount
  13656.   to make the Français score screen look good.
  13657.  
  13658. * SMALL BUGS: Microscopically small even 8)   The following spells would,
  13659.   in exploration mode, reveal the position of the target for a brief
  13660.   instant by drawing a blank image in the target cell.
  13661.   However, this blank image was immediately redrawn properly.
  13662.   Apparently nobody ever noticed this small flaw.
  13663.  
  13664.   It affected the following spells:
  13665.   Armour, Brain Boost, Cloak, Combat, Cursed Sword, Magic Shield,
  13666.   Meteor Storm, Recover Boost, Restoration, Sword of Sassenrath,
  13667.   Scavengerism and Exophagy.  NOW FIXED.
  13668.  
  13669. * ALL appropriate occurrences of DrawCell() have now been replaced with
  13670.   ReDrawCell()  I systematically went through the entire program and did
  13671.   this.  DONE.
  13672.  
  13673. * 1st and 2nd Spell Information Panels have now been 100% translated into
  13674.   Français.
  13675.  
  13676. * Replaced all appropriate occurrences of player_name[x] with
  13677.   PlayerName(x) in the entire program + coded the PlayerName() routine to
  13678.   handle the multilingual translation issues.  This took 1 hour.
  13679.  
  13680. * Sent Frédéric version 2.85 for testing/translating on July 19th, 2000.
  13681.  
  13682. * Sent JKD version 2.85d for OS 3.5 + MagicMenu + P96 + CyberGraphx
  13683.   testing.  He reports that Chaos works perfectly on all systems!
  13684.  
  13685. -------------------------------------------------------------------------
  13686.                       CODE REDUCTION UPGRADE
  13687.  
  13688. There are tons of no-longer-used routines in info.c.  These were originally
  13689. used for the old 640x256 information panels.  The code was still in the
  13690. game and active so that I could switch between the old way and the new
  13691. hires way any time I wanted.  However, I never actually did that.
  13692. And now the old code is seriously out of synch with the new way of doing
  13693. things so I am finally eliminating it all.
  13694.  
  13695.  
  13696. Eliminated 1252 lines of code from info.c
  13697. Info.c 155488 -> 103018  SAVED: 52470 bytes of source code.
  13698. Chaos  433540 -> 420040  SAVED: 13500 bytes off the release version of the
  13699. Chaos executable.
  13700.  
  13701. All the code that I removed has been saved in SC:UnusedInfo.c in case I
  13702. need to reference it for some strange reason.  Which I seriously doubt I
  13703. ever will.
  13704.  
  13705. ---------------------------------------------------------------------------
  13706.  
  13707. * TEST lzx vs lha
  13708.   I archived a complete demo distribution of the game
  13709.   lzx: 4942881 bytes.
  13710.   lha: 5298980 bytes.
  13711. SAVED:  356099 bytes.
  13712.  
  13713. * Sent Xav version 2.85 for playtesting on July 20th, 2000.
  13714.  
  13715. BEGIN: version 2.86
  13716. * Replaced EndTurn.8svx with Frédéric's EndTurn.8svx because nobody liked
  13717.   the old end turn sound.  I renamed the old EndTurn.8svx to MaxCombat.8svx
  13718.   and changed the game code to play this sound anytime anyone casts a spell
  13719.   that makes a creature have maximum combat.  This means the following spells:
  13720.   Combat, Touch of God, Chaos Lord.
  13721.  
  13722.  
  13723. -------------------------------------------------------------------------
  13724.  Translation of IP1 (Information Panel 1) Creature Statistics Screen
  13725.  to: Français.
  13726.  
  13727. * Scavenge translates to Charognardise which is _entirely_ too long.
  13728.   So I'm leaving this in English.  Someday when we make the AGA version
  13729.   this can be changed to the "Scavengerism" spell icon, which looks quite
  13730.   nice.
  13731.  
  13732. Magic Resistance translates to Résistance magique which is too long.
  13733. Résistance magique -> Résist. magique
  13734.  
  13735. Ranged Combat translates to Combat à distance which is too long.
  13736.  
  13737. > Ok, so how should the info panel look?
  13738. >
  13739. > Option A:
  13740. > Combat
  13741. > Tirer
  13742. > Combat spécial
  13743. >
  13744. > Option B:
  13745. > Combat
  13746. >   à distance
  13747. > Combat spécial
  13748. >
  13749. > Option C:
  13750. > Combat
  13751. > ... à distance
  13752. > Combat spécial
  13753. >
  13754. > Option D:
  13755. > Combat
  13756. > Combat de loin
  13757. > Combat spécial
  13758.  
  13759. Xav: Option A is the good one.
  13760.  
  13761. JC: Option A implemented.
  13762.  
  13763.  END Translation of IP1 (Information Panel 1) Creature Statistics Screen
  13764.  to: Français.
  13765. -------------------------------------------------------------------------
  13766.  
  13767. * Reduced the amount of time that the horrible looking circular pattern is
  13768.   displayed on the lissa-box requester things.  Reduced it to 1/3 of its old
  13769.   value.
  13770.  
  13771. * ADDED Multingual talklists code so that now the game can use talklists of
  13772.   any supported language.
  13773.  
  13774. * The dir structure of certain things in Chaos has now changed.  The
  13775.   Screens/ dir and TalkListsDir/ have changed.  So any further updates issued
  13776.   need to be COMPLETE updates, not just the executable file.
  13777.   Possibly other things in the dir structure or file structure have changed
  13778.   also.
  13779.  
  13780. * FLAW: Touch of God and Chaos Lord do not do any sort of graphical effect!
  13781.   So you cannot tell who it is being cast on!  NOW FIXED.
  13782.  
  13783. * Improved CellEffect() with better sound file handling.
  13784.  
  13785. * PROBLEM: The req.library filerequester is optimized for use on
  13786.   non-interleaved bitmaps.  This means the scrolling sucks bigtime on the
  13787.   chaos interleaved bitmaps.  It colorflashes horribly.  It goes from having
  13788.   the best scrolling of any filerequester to suddenly having the worst
  13789.   scrolling of any filerequester.  So I opened up yet another new screen.
  13790.   This one is just like the old HiResScreen only it is noninterleaved.
  13791.   Now the scrolling looks fast and smooth again!  NOW FIXED.
  13792.  
  13793. * LOAD/SAVE screens now have smooth scrolling once again.
  13794.  
  13795. * Copied the entire gamedir over to Chaos_2.9/ so that I may now begin work
  13796.   on the Enhanced Graphics Version on Tuesday, July 25th, 2000.
  13797.  
  13798. * Fixed Passage description.
  13799.  
  13800. * July 25, 2000: The size of the release executable file "chaos" is
  13801.   421048 bytes.
  13802.  
  13803. *************************************************************************
  13804. *      BEGIN  ENHANCED GRAPHICS VERSION  V 2.9  July 25, 2000           *
  13805. *************************************************************************
  13806.  
  13807.  
  13808. I have written a new graphics system that uses standard iff pictures to
  13809. describe how monsters and magic spells and all other objects in the game 
  13810. look.
  13811.  
  13812. Each object in the game has its own 320x256 64 color EHB mode iff file.
  13813.  
  13814. The name of the file is, and must be, the exact name of the object in
  13815. English.  The spaces must be there so don't try to rename them.
  13816. All the files are already included with the proper name in gfx/Spells/
  13817. so you don't need to worry about this.
  13818.  
  13819. All you have to do is edit any of the files you want and they will
  13820. automagically get included into the game.  Unless for some reason the clock
  13821. in your Amiga is broken.  In which case you may have to type in the shell:
  13822. delete gfx/dat/#?
  13823. That will delete the graphics index files and force the game to rebuild
  13824. them from scratch.  It takes a full minute to rebuild all the tiles from
  13825. scratch because it must open and close 350 files + read in 350 files +
  13826. decompress 350 files + cut and paste 731 tiles, check for blank frames,
  13827. etc.  These numbers are only accurate as of July 25th, 2000.  The numbers
  13828. will be much larger in the future.
  13829.  
  13830. If you change any graphic file then the next time you start the game, it
  13831. will notice that you have changed something and will rebuild the tile
  13832. indexes.  This will take a full minute or more.
  13833.  
  13834. Selecting "New Game" from the menu is currently not sufficient to reload
  13835. the tiles.  You must completely quit the game (exit to DOS or WorkBench).
  13836. Then reload the game and all will be well. 8)
  13837.  
  13838. The old 3 frame animation limitation has been ERADICATED.  You may now draw
  13839. or render as many frames as you like.
  13840.  
  13841. The old 32-color limitation has been ERADICATED.  I couldn't think of any
  13842. conceivable reason why any strategy game should be limited to 32 colors.
  13843. All Amigas support 64 colors or more so we are going to use them.
  13844.  
  13845.  
  13846. Ye Olde Rules for GrafixMages:
  13847. ==============================
  13848.  
  13849. 0. The first 31 pixels at the top of the screen are ignored.
  13850. 1. All Living Creatures _MUST_ have a dead image!  (Even if you just cut &
  13851.    paste in an image of a dead orc.)  The leftmost tile is reserved for
  13852.    the dead image and only the dead image.
  13853. 2. All Inanimate Objects and Growths and Undeads must _NOT_ have a dead
  13854.    image.  Its dead image space should be blank.
  13855. 3. You may have as many frames of animation as you like.  Ping-Pong
  13856.    and continuous looping playback are both currently supported.
  13857. 4. In order to specify that you want your animation played in looping mode
  13858.    you must change the purple line at line 32 to be color #1.  This tells
  13859.    the game to play this animation in a continuous loop.
  13860. 5. The animation frames are terminated by the first completely blank frame.
  13861. 6. The image must use the supplied palette.  If you rearrange the palette
  13862.    for artistic reasons then you _MUST_ rearrange it back to its original
  13863.    state before saving the file.  Failure to do this will result in
  13864.    wrong-looking graphics.
  13865. 7. If you want to leave extra grafix on the screen that you are working on
  13866.    then that's ok.  They will be ignored.  Only the tiles up to the first
  13867.    blank tile are processed by the game.  Any extra gfx at the bottom of the
  13868.    screen are ignored.
  13869.  
  13870.  
  13871. ----------------------------------------------------------------------------
  13872.  
  13873. * BUG: When playing in exploration mode, if you try to examine an
  13874.   unexplored cell and the cell has a scroll in it then it lets you read
  13875.   the scroll!  NOW FIXED.
  13876.  
  13877. * BUG: Joseph Conwell reports that he cast Sword of Sassenrath on his Orc
  13878.   and then when it promoted to Mighty Orc it lost its Sword of Sassenrath.
  13879.   JC: This is because it promotes to whichever stat is bigger.  0 > -1 so
  13880.       it makes sense.  However I have now hacked in some extra code so that
  13881.       if you posess negative special combat then it will be promoted to
  13882.       whichever stat has the greatest absolute value.  NOW FIXED.
  13883.  
  13884. 1. Write and test code to read in all the tiles from IFF files. DONE.
  13885. 2. Load new color palette. DONE.
  13886. 3. Rewrite ColorCycler.  DONE.
  13887. 4. Redefine all #defined colors to new values.  DONE.
  13888. 5. Rewrite ReDrawCell() to use the new multiframe-capable form.  DONE.
  13889.  
  13890. 6. Totally rewrite the animator task to handle the new tiledata + keep
  13891.    track of the multiple framecount stuff and which direction it is going
  13892.    through the animation in.
  13893.    Animator tasks needs the following variables:
  13894.    1. WORD FrameCount so it knows what frame it is on.
  13895.    2. WORD AnimationDirection. 1=Forwards, -1=Backwards. (for ping pong playback)
  13896.            0=stopped.
  13897.    3. BYTE PlayBackType 0=PingPong. 1=ContinuousLoop.
  13898.    ALL DONE.
  13899.  
  13900. 7. Rewrite sm.c to handle new variables:
  13901.    sm.c FrameCount will ALWAYS be set to 1
  13902.    sm.c AnimationDirection will ALWAYS be set to 1.
  13903.    ALL DONE.
  13904.  
  13905. 8. Edited Meteor Storm spell to work with new system. DONE.
  13906. 9. Rewrite the entire game to use the new system. DONE.
  13907.  
  13908. 10. Eliminate all old references to the old hardcoded cimage1[], cimage2[]
  13909.     and cimage3[] arrays which limited the game to 3 frames of animation.
  13910.     DONE.
  13911.  
  13912. 11. Eliminate all old references to DeadImages[] array. DONE.
  13913.  
  13914. 12. Added the code to support loading files with CONTINUOUSLOOPing anims.
  13915.     Just change the color of the first line to #1 and the anim will play in
  13916.     looping mode.  DONE.
  13917.  
  13918. 13. Hack in code to write out all those hardcoded cell effects gfx and
  13919.     color convert them to the new palette and store them as IFFs in the
  13920.     gfx/CellEffects/ dir.  DONE.
  13921.  
  13922. 14. Write code to read in the IFF CellEffects. DONE.
  13923. 15. Rewrite CellEffect() to use the new IFF gfx.  DONE.
  13924. 16. Rewrite BoardEffect() to use the new IFF gfx. DONE.
  13925. 17. Remove all hardcoded explosions and magical effects graphics. DONE.
  13926. 18. Don't load the old graphics file "chaos.dat" anymore. DONE.
  13927. 19. REMOVE all graphics handling from sm.c. DONE.
  13928.  
  13929. 20. Edit all 349 spell files and remove all spell-descriptions and imagery.
  13930.     Remove all Description: info and Imagery: info and Image: info.  DONE.
  13931.  
  13932. 21. Edit sm.c to remove all code related to reading/processing/including
  13933.     image files into the compilation process. DONE.
  13934.  
  13935. 22. Edit sm.c to remove all code related to reading/processing/including
  13936.     spell descriptions into the compliation process.
  13937.     Comment out or delete everything to do with spell descriptions.
  13938.     DONE.
  13939.  
  13940. 23. There are several programs that are being compiled by the makefile in
  13941.     order to make the old compressed spell descriptions file "pool.ssc"
  13942.     Eliminate them.  DONE.
  13943.  
  13944.     Now that I've eliminated all that stuff from the makefile
  13945.     (spell descriptions, text compression encoding & decoding routines)
  13946.     + all that stuff from the spell manager (description processing and
  13947.     image processing)  a smake clean smake developer version now takes only
  13948.     11.5 minutes on my 25 Mhz 030 (freshly booted, not on the internet)
  13949.  
  13950. 24. Convert all the levels to the new animation system.
  13951.     A. Load each old level.
  13952.     B. Go through the entire visible board and underboard
  13953.     C. If FrameCount==0 then FrameCount=1;
  13954.     D. Stuff 1 into the AnimationDirection
  13955.     All levels have now been converted to the new animation system! DONE.
  13956.  
  13957. 25. Edit io.c to handle loading a game that was using one set of graphics
  13958.     files into a system that is using completely different graphics files.
  13959.     Check for any currently illegal settings and adjust them.  DONE.
  13960.  
  13961. 26. Add in gfx/Spells/ and gfx/dat/ and gfx/CellEffects to MakeDemoOfChaos.txt
  13962.     DONE.
  13963.  
  13964. 27. GRAPHICS:
  13965.     Put in Xav's new moon from setupscreen as Sanctuary.  DONE.
  13966.     Put in Kreton's Wizard graphic as Wizard 1.  DONE.
  13967.     Edit Generator. DONE.
  13968.     Remove blood from ShapeChanger. DONE.
  13969.     Spriggan is messed up.  Fix him.  DONE.
  13970.     Mess with Witches as new wizards.  Leave this for Xav.
  13971.     Amphisbaena is all messed up.  Leave this for Joe or Xav.
  13972.  
  13973. 28. Edit SpellManager script file to remove everything to do with
  13974.     spell descriptions and images.  DONE.
  13975.  
  13976. 29. Add in code to load the setupscreen1 from
  13977.     gfx/Screens/English/SetupScreen1.iff   DONE.
  13978.  
  13979. 30. Rewrite the setup code to have everything on SetupScreen1 positioned
  13980.     correctly.  This took some time because the name gadgets were
  13981.     overwriting the border.  DONE.
  13982.  
  13983. 31. Add in code to load the setupscreen2 from
  13984.     gfx/Screens/English/SetupScreen2.iff  DONE.
  13985.  
  13986. 32. WOOPS!  I forgot to rewrite PutToSleep() to stop animating creatures
  13987.     that are asleep!  There is a sleeping Pegasus that is still flapping
  13988.     its wings like crazy!  NOW FIXED.
  13989.  
  13990. 33. Rewrite Flesh to Stone and Mass Petrification to properly stop the
  13991.     newly created inanimate object from being animated.  DONE.
  13992.  
  13993. 34. Rewrite Stone to Flesh and Inanimorphobiosis to properly reactivate
  13994.     the animation on a previously-animated creature.  DONE.
  13995.  
  13996. 35. Put Xavier in the scrolling credits and the docs. DONE.
  13997.  
  13998. 36. FLAW: The pentagrams on the "About" screen are now invisible due
  13999.     to the new color palette!  NOW FIXED.
  14000.  
  14001. 37. Add in code to load the EndTurn, Question Mark, Dismount, Load and Save
  14002.     gadgets from gfx/Gadgets/English/
  14003.  
  14004.  
  14005.  
  14006. How to test a lzx archive:
  14007. lzx t archive.lzx >T:test.txt
  14008.  
  14009.  
  14010. After converting all the gfx to IFF files, the following spells looked
  14011. horrible and I spent some time editing them.
  14012.  
  14013.  
  14014. Abath: I antialiased him and redrew his horn so now it looks really good.
  14015. Abduction Converted horribly so I edited it some.
  14016. Achiyalabopa: I added texture + antialiased it.
  14017. Acid Rain: Antialiased it. Beveled it.
  14018. Aerial Servant: I added texture + antialiased it.
  14019. Aesculapius: Skipped.  I think Xav has already redrawn it + Aes drew one in
  14020.   64x64 that needs to be shrunk down and used for this creature.
  14021.   Put in Xav's new "Snake" Aesculapius + drew a dead image for it.
  14022.  
  14023. Agathion: Antialiased it.
  14024. Air Elemental: Antialiased it.
  14025. Alliance: Antialiased it.
  14026. Alter Reality: I attempted to shade it with shadows.  Limited success.
  14027. Alternography: antialiased it.
  14028. Amphisbaena: Antialiased it.
  14029. Animate: Included Xav's stupendously wonderful looking Animate!
  14030. Apple Wood: Added some texture. Antialiased it.
  14031. Arborist: Antialiased it.
  14032. Archery: Antialiased it.
  14033. Arctic Wolf: I got rid of the hard black background + antialiased it. Then
  14034.   I changed the colors to be whitish like an Arctic Wolf should really look.
  14035.   The old wolf I saved as "Dark Wolf" for future use.
  14036. Armour: Antialiased it.  Replaced it with Xav's gray-scale Armour.
  14037. Aviary: I hated how the old one looked so Joe and I completely remade it.
  14038. Azer: Antialiased it.
  14039.  
  14040.  
  14041. Included Joseph's improved Abath, Arborist, Alliance, Agathion, Azer,
  14042. Apple Wood, Aviary.  I totally redid Joe's Aviary and Apple Wood and
  14043.   Archerotomy.
  14044.  
  14045. Included Xav's improved: Agathion, Air Elemental, Acid Rain.
  14046.  
  14047.  
  14048.  
  14049. I made a new variation of the baboon called baboon2.  I may use
  14050. this in the future somehow.
  14051.  
  14052. Baboon: Antialiased it.
  14053. Banderlog: Antialiased it.
  14054. Bandit: Antialiased it.
  14055. Basalt Golem: Antialiased it.
  14056.  
  14057. Basilisk: I gave the basilisk a purple eyeball + Antialiased it.
  14058. Battle Cry: It converted badly so I fixed it.  Then I anti-aliased the flag
  14059.   also.
  14060. Bat: Antialiased it.
  14061. Bat: I went back and totally redrew it and made a new dead body.  The only
  14062.      problem now is that it is not animated :(
  14063.      Included Xav's new well-drawn and animated Bat!
  14064.  
  14065.  
  14066. Betrayal: converted horrbily so I had to fix it.  Then I added shadowing to
  14067.   it.
  14068. Biohazard: Beveled it.
  14069. Bipedal Generator:  I always hated the way the Bipedal Generator looked so
  14070.   I anti-aliased it, recolored it and beveled it.
  14071.  
  14072. Bird Lord: I antialiased it.  Then I went back and antialiased the
  14073.   antialiasing so its SUPER smooth looking.
  14074. Blue Dragon: Double antialised it.  Its super smooth now!
  14075. Bodak: Antialiased it.
  14076. Boil: Antialiased it.  It looks a LOT nicer now! Redid it using Xav's new
  14077.   Flood graphic.
  14078. Bolter Wall:  I made it rotate.
  14079.  
  14080. Brain Drain and Brain Boost converted badly so I fixed them then I
  14081.   anti-aliased them.  Now they look really nice! (compared to how they used
  14082.   to look)
  14083. Brain Drain Beam converted horribly so I edited it and fixed it up and
  14084.   antialiased it.
  14085. Bury: Antialiased it. Threw it away because it sucked.  Pirated the bloody
  14086.   corpse from Xav's Scavengerism and the arrow from Xav's Animate and then
  14087.   drew some grass and a pile of dirt.  It looks 10x better than the old one.
  14088.  
  14089. Burstroem's Browser: Included Xav's book.  Added more antialiasing to the
  14090.   bottom of the book.
  14091.  
  14092. Included Joseph's new Bandit and Baboon.  They are both MUCH better than the
  14093.   originals!
  14094.  
  14095. Included Joseph's new Battle Cry and Biohazard.  Battle Cry REALLY needs
  14096.   32x32 pixels and 256 colors!
  14097. Included Xav's Fantabulous Battle Cry!
  14098. Included Xav's new Biohazard.  I will use Joseph's Biohazard as something
  14099.   else.
  14100. Included Joseph's new Bipedal Generator and Bodak.
  14101. Edited Joseph's new Basalt Golem into an animation and included it.
  14102.  
  14103.  
  14104.  
  14105.  
  14106. Camel: Double Antialiased it and made the hump bigger too.
  14107.  
  14108. 16x16 pixels is such an absurdly low resolution that it is many times not
  14109. possible to do proper anti-aliasing :(
  14110.  
  14111. Cartography: Antialiased it.  Included Joe's new Cartography.
  14112. Cat Lord: Antialiased it. Included Joe's new Cat Lord.
  14113. Centaur: Antialiased it.  The tail looks much better, its fluffier.
  14114. Chaos Lord: Antialiased. Included Joe's new Chaos Lord.
  14115. Chronomancer: Antialiased it. Replaced it with Xav's Chronomancer from his
  14116.   setupscreen.  Drew a dead body for it.
  14117. Clay Golem: Made a dead body for it.
  14118. Cloak: antialiased it.  Included Joe's new cloak.  It could be better.
  14119. Combat: Included Joe's new Combat.
  14120. Combat Drain Beam: Included Joe's new Combat Drain Beam.
  14121. Command: Didn't translate so well so I fixed it.  Later on I replaced it
  14122.   with Xav's fantastic new version!
  14123. Confidence: I included Joe's new Confidence.
  14124. Convert: Changed the "M" to a "C" and antialised the whole thing.
  14125. Crimson Death: Antialiased it.
  14126. Crocodile: Antialiased it.  Included Joe's slightly improved Crocodile with
  14127.   texture on his back + it now has feet.
  14128. Cursed Sword: Antialiased it and made the hilt a bit smaller.
  14129.  
  14130.  
  14131. Dalek: Antialiased it. Included Joe's improved version + double antialiased
  14132.   it.
  14133. Dao: Antialiased it.
  14134. Dark Citadel: Antialiased it.
  14135. Dark Wood: Antialiased it. Replaced it with Xav's new bleeding version.
  14136. Dead Revenge: Antialiased it.  Included Joe's improved version.
  14137. Demon: Antialiased it.
  14138. Depth: It was already partly antialiased!  Oh well, I antialised it all the
  14139.   way and now it looks sort of fuzzy but there is NO blockiness at all.
  14140. Derro: Antialiased it.
  14141. Destroy Wall: The converted version looks BETTER than the original!  No
  14142. changes made.
  14143. Dire Wolf: Antialiased it.  It really looks better.
  14144. Discard: Antialiased it.
  14145. Disection: Antialiased it.
  14146. Disrupt: Antialiased it.
  14147. Dragon Nest: Antialised it but it didn't work out very well. :(
  14148. Drain: Antialiased it.
  14149. Dread Elf: Antialiased it.
  14150. Drelb: Antialiased it.
  14151. Dual Earthbind: Antialiased it.
  14152.  
  14153. Eagle: Antialiased it.
  14154. Earth Elemental: Included Joseph's new version.
  14155. Eidetic Xenogenicide: Joseph totally redesigned it.  It looks much better.
  14156. Elephant: Antialised it.
  14157.  
  14158.  
  14159. Sent Xavier Elf Boots + Harpy because I don't know how to make these look
  14160.   better.
  14161.  
  14162.  
  14163. Elm: I 100% Antialiased it.
  14164. Emerald Dragon: I 100% antialiased it.  It looks really nice now.
  14165. Encumberance Beam: I included Joseph's new version.
  14166.  
  14167. Exorcise: I simply replaced the old Exorcise graphic which wasn't so bad
  14168.   with a new one designed by Aes which is TOTALLY AWESOME!  It has great
  14169.   shading in it!!!  Oops its 2 pixels to tall and 2 pixels too wide!
  14170.   NOW FIXED!
  14171.  
  14172.  
  14173.  
  14174. Falcon: Antialiased it.
  14175. Faun: Antialiased it.
  14176. Fir: Antialiased it.
  14177. Fire: Antialiased it.
  14178. Fire Bat: Antialiased it.
  14179. Joseph made a new "Bat Out of Hell" graphic (It might not be 100% finished
  14180. yet)
  14181. Fire Demon: I antialiased it and made the color texture a bit better.
  14182. Fire Elemental: I antialiased it and changed some pixels around to add some
  14183.   extra color.
  14184. Fire Shield: Antialiased it a tiny bit.
  14185. Fireball: Antialised it.  Replaced all green with Purple.  Replaced all
  14186.   Gray with Orange.  Splattered some more orange around in the red.
  14187. Flesh to Stone: Antialiased it.  Replaced all Green with light gray. The
  14188.   rock had many transparent black holes in it!  I Replaced some of these
  14189.   with dark gray and others with hard black (nontransparent).  I also added
  14190.   some shading to the "+" which looks very nice.
  14191. Floating Eye: Antialiased it and cleaned it up some.  It looks better now.
  14192. Flood: Antialiased it and threw some extra colors arond randomly in 1 of
  14193.   the frames.
  14194. Flood Shield: Antialiased it and then added beveled edges and more color.
  14195. Fly: Antialiased it.
  14196. Free All: Antialiased it.  Changed the color of the 2nd key to be
  14197.   compatible with antialiasing.
  14198.  
  14199. Generator: Antialiased it.
  14200. Ghast: Double Antialiased it.
  14201. Ghost: Double Antialiased it + added sparkle to the white and blue dots.
  14202. Ghoul: Antialiased it and added sparkle to the dots.
  14203. Giant Beetle: Antialiased it.  Used a beetle clipart as a template to
  14204.   redraw it. NOW IT LOOKS AWESOME!
  14205. Giant Rat: I antialiased it and it now looks WAY THE HELL better!!!
  14206. Giant Spider: Antialiased it but the colors were so dark to start with that
  14207.   you can't really see any difference.
  14208. Goblin + Goblin Bomb: Antialiased.
  14209. Golden Dragon: Antialiased.  It looks much better now.  This creature
  14210.   already had halfway good shading to it.
  14211. Gooey Blob: I single antialiased it and it looked good.  But there are so
  14212.   many shades of the same green in the palette I decided to go ahead and
  14213.   double antialias it.  It now looks very fuzzy.  I'm not sure if this is
  14214.   better than single antialiasing or not.  It does look smoother and less
  14215.   pixelated but its very fuzzy.  Its probably better to have it look fuzzy
  14216.   so I'm leaving it like this.
  14217. Gorilla: Antialiased it.
  14218. Gravity Sphere: It looks horrible and I didn't bother trying to fix it in
  14219.   any way.
  14220. Gray Elf: Antialiased it.
  14221. Green Dragon: I antialiased it.  Then I tried adding some shadowing and
  14222.   texture and it came out quite nice!  Its nowhere near Xav-Quality but its a
  14223.   lot better than it was originally.
  14224. Green Oozey Crap: I screwed around with it and stuff... It looks better
  14225.   than it did.
  14226. Grizzly Bear: AntiAliased it and added some shading to the dead image.
  14227. Gryphon: Antialiased it.
  14228.  
  14229.  
  14230. Halfling: Antialiased him.  Made his dead image be decapitated with his own
  14231.        sword.
  14232. Harpy: I antialiased it.  Ack!  Its drawn on a hard foreground black!
  14233.        NOW FIXED. A few days later I went back and partly double
  14234.        antialiased it and added some simple shading to it.
  14235. Haste: Antialiased it.  I tried to add a drop shadow to the + but it looked
  14236.        terrible.
  14237. Haunt: I antialiased him then I animated him!  This is my first attempt at
  14238.        animation.
  14239. Hidden Horror: This is supposed to look identical to a halfling so I just
  14240.        copied the Halfling as this.
  14241. Higher Devil: I only made extremely minor touchups on this.
  14242. Hippocrates: Antialiased him.  Moved him to the edge to make room for my
  14243.        new improvements.  Added a Caduceus and a Red Cross so that it is
  14244.        obvious that he heals.  Removed the Dead Orc Image and made him a
  14245.        real Dead Image.
  14246. Horror: Antialiased it and added some simplistic shading.
  14247. Horse: Antialiased it.
  14248. Hybsil: Antialiased it.
  14249. Hydra: Antialiased it.  Added shading.
  14250. Hyperclone: Made simple modifications.
  14251.  
  14252.  
  14253. Ice Breath: Tried to antialias it some.
  14254. Imp: Antialiased it and added some nice shading!  Redrew the Dead Image.
  14255.  
  14256.  
  14257. Inanimage and Inanimatologist look identical to a Wizard 1!
  14258. I propose:
  14259. Xav's Wizard 1 becomes Inanimage.
  14260. Xav's Wizard 1 minus the wand becomes Inanimatologist.
  14261. There will be a completely new wizard for Wizard 1. (I'll decide which
  14262. graphic later on)
  14263.  
  14264. This means the old Inanimage/Inanimatologist/Wizard 1 will be used for
  14265. absolutely nothing!  But I can assign him to be something later.
  14266. I can also draw sparkles around the end of the wand.
  14267.  
  14268. Inanimorphobiosis: I couldn't really do anything to this because it just
  14269. plain needs a much better rock.
  14270.  
  14271. Invert: I messed around with it some... Didn't really improve it.
  14272.  
  14273.  
  14274. Jaguar: Antialiased it.
  14275. Jann: Antialiased it.  The dead image was the same as the Dead Orc so I
  14276.       redrew it.
  14277. Joker: I added shading to it and made it look 8x better than before!!
  14278. Juju Zombie: Antialiased it.
  14279. Justice: Change the shading on part of his face.
  14280.  
  14281. Kill: Added Beveling with only limited success.
  14282. King Cobra: Antialiased it and added a bit of shading.
  14283.  
  14284.  
  14285. Leopard: Antialiased it and changed the green spots into golden spots.
  14286. Lesser Devil: Antialiased it.
  14287. Level: Beveled it and shadowed it.
  14288. Lich: Antialiased it and gave it yellow eyes.
  14289. Lich Lord: Antialiased it and gave it yellow eyes and modified the crown.
  14290. Lightning: Beveled it.
  14291.  
  14292. Magic Bow: Antialiased it and made the curve of the bow extremely smooth.
  14293. Magic Castle: The original was so so hopeless looking that I didn't bother
  14294.   trying to smooth it out.  I just replaced it with Xav's "Dark Castle".
  14295.   The Dark Castle has a flaw: The Door and windows are made of the
  14296.   transparent black instead of the hard foreground black.  NOW FIXED.
  14297. Magic Knife: I replaced the old one with Xav's new one.
  14298. Magic Shield: I simply replaced the old one with the one that Aes drew for
  14299.   me many months ago.  However this shield looked like a normal shield.  But
  14300.   this shield ONLY increases your magic resistance so I added some
  14301.   color-cycling to it so that people would remember that it is a _magic_
  14302.   shield not a real shield.
  14303. Magic Sword: I replaced the old one with Xav's new one.
  14304. Magic Wand: I never liked the old one so I drew a completely new one.
  14305. Magic Wood: I completely redrew the trunk so its 10x better.  I haven't
  14306.   decided what to do about the treetop though?  Should it be a normal treetop
  14307.   but with some color cycling added to indicate its a magic tree?  Or what?
  14308. Manticore: I antialiased it then I drew a shadow under the wing.  The
  14309.   shadow looks nice.
  14310. Marid: Antialiased it and added the stripe to the dead image.
  14311. Mass Morph: I just took Xav's Animate spell and switched it around.
  14312. Memory Master: Antialiased him and made a completely new dead body with
  14313.   blood splats and decapitated head.
  14314. Memory Mage: (Originally looked identical to Memory Master).  I took my new
  14315.   Memory Master graphic and gave him a Magic Wand + shaded his costume
  14316.   according to the light shining on him from the magic wand.
  14317. Mind Flayer: Antialiased it.  Added a bit of shading.
  14318. Mount: Antialiased it.  Added a bit of shading.
  14319. Move it: Antialiased it, beveled it and made the whole the green for "go"
  14320. Mud Man: Antialiased it.  Totally redid the color + added a bit of shading.
  14321.   Totally redid the dead image.
  14322.  
  14323. Neo-Otyugh: Antialiased it and darkened the back leg.
  14324. Nightmare: Antialiased it and darkened the back legs.
  14325. No Grow: Antialiased it and added texture.
  14326. No Mount: Antialiased it and made the tail better.
  14327. Nuke: Redrew it. Antialiased it.
  14328.  
  14329. Ogre: Antialiased it, shaded it, made the arm have a shadow, improved the
  14330.   head.
  14331. Ogre Mage: The Ogre Mage looked identical to the Ogre so I just kept it
  14332.   that way for now.
  14333.  
  14334. Ogre Warrior: The original Ogre Warrior was just a mirror image of the Ogre
  14335.   so that is how I did the new one.  I just mirrored the Ogre and saved it.
  14336.   This means the shadowing is actually backwards.  But oh well... we can
  14337.   worry about that later.  Maybe it will be funny to have a backwards shadow
  14338.   on him?
  14339.  
  14340. Ogre Assasin: He's just like the Ogre Warrior but with a differnet
  14341.   animation sequence.  He has the backwards shadow as above.
  14342.  
  14343. Oracle: Designed by Xav.  I brightened the crystal ball a bit and made it
  14344.   look like the Oracle's fingers were touching the crystal ball.
  14345.   For the dead image I drew a crystal ball laying on the ground + pirated
  14346.   the dead image from Scavengerism.
  14347.  
  14348. Orange Jelly: Antialiased it.  This graphic needs professional attention.
  14349.  
  14350. Orc: Antialiased it.  Changed his face.
  14351. Orcs: same as Orc.
  14352.  
  14353.  
  14354. Paradigm Shift: Antialiased it.
  14355. Passage: Antialiased it. Beveled it.
  14356. Pegasus: Antialiased it.
  14357. Pit: Recolored it and antialiased it.
  14358.  
  14359.  
  14360. Probably use a Xav graphic for Plasma Beam.
  14361. Platinum Dragon: Antialiased it.  Double Antialiased parts of it to make it
  14362.   really smooth.
  14363. Points: Antialiased it.  Beveled it.
  14364. Poison Dagger: Antialiased it.  Drew blood on it.  Drew blood dripping from
  14365.   it.  It now looks really cool.
  14366. Pool: Antialiased it.
  14367. Power Wall: Antialiased it.
  14368. Pox Shield: Antialased it.
  14369. Protection: NEEDS TO BE REDRAWN!
  14370. Pseudodragon: Antialiased it.  Added a bit of shadow under the wing.
  14371.   Double antialiased parts.
  14372. Pyrohydra: Its identical to the Hydra.
  14373. Pyrotechnics: Antialiased it.  Beveled it.
  14374. Python: Antialiased it.
  14375.  
  14376. Quench: Antialiased it + smoothed the fire a bit.
  14377. QuickShot: Antialiased it and beveled it and changed the color to use the
  14378.   color cycling color and some brown.
  14379.  
  14380.  
  14381. Radioactive Land: It was just a bunch of green dots, it could have been
  14382.   grass!  I changed the green dots to purple dots so now it really looks
  14383.   radioactive.
  14384. Raise Dead: Pirated some of Xav's gfx and rearranged them and edited them
  14385.   into a nice Raise Dead graphic.
  14386. Range Boost: Antialiased it and beveled it.
  14387. Red Dragon: Double antialiased him.
  14388. Reflector: The colors did not convert well so I recolored it and
  14389.   double-beveled it.
  14390. Replicate: I tried to antialias it but it came out looking HORRIBLE so I
  14391.   left it alone.
  14392. Repulsion: Double beveled it and added many more shades of color.
  14393. Roper: Antialiased it + shaded it.
  14394.  
  14395.  
  14396. Separation: Took the alliance spell and drew a big X over it.
  14397. Shadow Dragon: Antialiased the arms.  Put a 3,1,0 brown dot at the end of
  14398.   the tail and foot.
  14399. ShapeChanger: Joseph should do some kewl morphing with this!!
  14400. Skeleton: Antialiased it.
  14401. Slow: Beveled it.
  14402. Solar: Antialiased it.
  14403. Spectator: Made it perfectly round.  Antialiased it.  I could easily make
  14404.   an awesome animation out of this one!  *****************
  14405. Spectre: Antialiased it.
  14406. Speed: Beveled it.
  14407. Spriggan: Antialiased it.
  14408. Still: Antialiased it.
  14409. Stone Giant: Antialiasd it.
  14410. Stone Golem: Made a better dead body.
  14411. Stone to Flesh: Pirated some Xav gfx to make this one.
  14412. Strong Wall: Darkened it.
  14413. Subversion: Beveled it.
  14414. Summons: Beveled it.
  14415. Swap: Changed the colors a bit + beveled it.
  14416.  
  14417.  
  14418. T-Rex: Antialiased him.  Double antialiased his back.
  14419. Teleport: Remade it using Xav's little man graphic.
  14420. Tempest: Antialiased it.
  14421. The Exorcist: I went crazy and totally redrew him with magical crosses that
  14422.   are animated with magical glowing + he turns his head.  I also made a dead
  14423.   image of him in a pool of blood with his cross stuck threw his body!
  14424.   Its totally cool!  His legs could be better though, but I don't know how?
  14425. Thundermare: Simple antialiased him + added blood on the dead body.
  14426. Torment: Beveled it.
  14427. Troll: Simple antialiasing + some blood.
  14428.  
  14429.  
  14430. Ubiquiscope: Beveled it.
  14431. Unicorn: simple antialiasing.  Changed the horn to white.
  14432.  
  14433.  
  14434. Vampire: Antialiased it. Shaded it.
  14435. Vodka: Find Kreton's Vodka!!!!
  14436. Volcano: Antialiased it a bit.
  14437. Vortex: Antialiased it a bit.
  14438. Vulture: Antialiased it.  Shaded it some.  Does this look ok?
  14439.  
  14440. Wasp Nest: Antialiased it.  The curves are ultra smooth now.
  14441. White Dragon: Antialiased it.  Added shadowing under the wings.
  14442. Wight: Antialiased it.
  14443. Wolverine: Antialiased it.  Tried to put some blood on the dead body.
  14444. Wood Elf: antialiased it.  Joseph improved it some.  Then I drew an arrow
  14445.   stuck in his head for the dead body. hehe.
  14446. Wraith: Antialiased it.
  14447.  
  14448.  
  14449. X-Ray: Beveled it.  Replaced the whole thing with Joseph's new color
  14450.   cycling X-ray.
  14451. Zombie: Antialiased it.  Tried to shade it some.
  14452.  
  14453.  
  14454. All spells A-Z are done!!!!! (EXCEPT FOR W!!!)
  14455. All W is done except for Wizards!
  14456.  
  14457. Went through Joe's L-Z.
  14458.  
  14459. Added in Joseph's new:
  14460. spectator, spriggan, speed, storm, sleep, skeleton, Hyperclone, Shocker.
  14461. Shape Changer, Shadow, Magic Attack, Lich Lord, Leopard
  14462.  
  14463. Put in Joseph's new: Joker, Justice (goatee), Iridium Horse (back leg),
  14464. King Cobra (hood, now brown), Imp (more frames of animation), Hippocrates
  14465. (now has a 2 pixel hat), Free All (now has 3 keys instead of only 2),
  14466. Dark Power (multi-shaded green), Aerial Servant (many frames of animation
  14467. + different colors)
  14468.  
  14469.  
  14470. Eye for an Eye: Needs to be totally redone! Animate Sux! Exophagy doesn't
  14471. even have a graphic!
  14472.  
  14473. Sent Eye for an Eye, Animate, Exophagy to Xav along with spell
  14474. descriptions:  They came back looking unbelievably awesome!!!!!
  14475.  
  14476. I removed the green from the side of the Tree in Animate.
  14477.  
  14478. Xav's Telescope: I lightened the moon.
  14479.  
  14480. Included Xav's Magic Bolt, Magic Glass, Mana Battery.
  14481.  
  14482. Included Xav's amazingly great new: Shadow Wood, Dark Wood, Fir Tree,
  14483. Magic Wood, Apple Wood.
  14484.  
  14485. Included Xav's amazingly great new:  Violet Fungi, Gooey Blob, Green Ooze,
  14486. Orange Jelly, Fire, Flood, Earthquake.
  14487.  
  14488.  
  14489. ---------------------------------------------------------------------
  14490.  
  14491. * August 2, 2000: The size of the release executable file "chaos" is
  14492.   325816 bytes.  On July 25 it was 421048.  SAVED 95232 bytes!
  14493.  
  14494. * Sent v2.9 to Xav on August 2, 2000 so he can design gfx for it over his
  14495.   2 weeks vacation.
  14496.  
  14497. * Put in Xav's fixed Wizard 2, Wizard 3 and Fly.  We still need 4 female
  14498.   wizards.
  14499.  
  14500. * Xav says to change the French spell desccription of Dark Citadel from
  14501.   Citadèle to Citadelle.  DONE.
  14502.  
  14503. * August 5, 2000: TileCount=824.  There are 824 tiles in the game.
  14504.  
  14505. * BUG: Mana Battery Scrolls give bonus spells just like a real Mana
  14506.   Battery.  NOW FIXED.
  14507.  
  14508. * BUG: 1 occurrence of "Brain Dead" was not using translated strings thus
  14509.   it was always appearing in English.
  14510.  
  14511. * Sprained my brain.  No work done for 10 days.
  14512.  
  14513. * August 15, 2000: Replaced all occurrences of "Run JCsound >NIL:" with
  14514.   "Run <>NIL: JCsound <>NIL:"
  14515.  
  14516. ********************************************************************
  14517.        Xav Returns from Vacation!  Lots of new Tiles!
  14518. ********************************************************************
  14519.  
  14520. Included Xav's new gfx:
  14521. Ball Lightning, Basalt Golem, Bless, Charm, Clay Golem, Coercion,
  14522. Cure, Dalek, Dao, Dark Wood, Death Bringer, Demonic Touch, Depth,
  14523. Destroy Wall, Discard, Double, Elephant, Fireball, Freeze,
  14524. Haste, Horse, Hyperclone, Irvine's Invulnerability, Justice, 
  14525. Lightning, Lion, Magic Bow, Meteor Storm, Moveit, Mullac de Irvine,
  14526. Protection, Pyotechnics, Quickshot (quickshot is hard to read but I went
  14527. ahead and included it anyway).
  14528. Radioactive Land, Recover Boost, Reflector, Replicate, Request, Reveal,
  14529.  
  14530. Restoration (I didn't like the one with the dithered heart, it needs more
  14531. shades of color or higher resolution so I used the nondithered version.)
  14532.  
  14533. Seismology, Shocker, Simulacrum, Sleep, Solar, Standard Wall, Stone Giant,
  14534. Stone Golem, Storm, Strong Wall, Touch of God, Triple,
  14535.  
  14536. Turns (I redid the 0).
  14537.  
  14538. Uncertainty, Unicorn, Vodka, Volcano, Wake, Weak Wall, Wight,
  14539. Wizard  1, Wizard 1, Wizard 6, Wizard 7, Wizard 8, Wizard Wings, Wraith,
  14540. Zombie.
  14541.  
  14542.  
  14543. The following gfx were identical to the gfx already in my version of
  14544. the game: Fly, Wizard 2, Wizard 3.
  14545.  
  14546. ********************************************************************
  14547.       END: Xav Returns from Vacation!  Lots of new Tiles!
  14548. ********************************************************************
  14549.  
  14550. August 18, 2000:
  14551.  
  14552. * Included Frédéric's new Français Spell Descriptions: Water Elemental,
  14553.   Sluggishness Beam and Combat Drain Beam.
  14554.  
  14555. Frédéric bug report:
  14556. * Something strange happened when I cast consecrate on a higher devil sitting
  14557.   on the bottom border of the screen: the devil himself was not killed, of
  14558.   course, but the spell did extra sound effects, as if there had been creatures
  14559.   below. And I heard an allelujah sound, and at the end of the turn the bonus
  14560.   window opened. No victim, no "Other", but I had the choice of 1 spell among
  14561.   31 !!!
  14562.  
  14563.   The trouble was that the Drainer() function had NO error checking!  Ack!
  14564.   all these years its been affecting cells that don't exist!  NOW FIXED.
  14565.  
  14566.  
  14567. * Sent all English and Français spell descriptions to Red|Blue in Quebec for
  14568.   proofreading.  He liked the game "Romance of the 3 Kingdoms" and "Bandit
  14569.   Kings of Ancient China" so I figure he'll like Chaos.
  14570.  
  14571.  
  14572. >>> * Due to impurities, a generator went asleep but continued to generate
  14573. >>> sleeping creatures. It's kind of strange don't you think ? Impurities
  14574. >>> shouldn't put generators to sleep ! They should only change their
  14575. >>> allegeance to a wizard or the independents (the sleeping creatures
  14576. >>> generated are often destroyed as soon as they are generated :-) )
  14577. >> This sounds sooooooooooo hilarious!!!! I don't know how you find all
  14578. >> this weird stuff out!!!! hehehehhahahahahahah 8)
  14579. >> It sounds so funny I'm not going to change it. I've never seen it
  14580. >> happen before! And if it does happen it must be very rare.
  14581.  
  14582. >> I probably should fix it so that it doesn't change to dead wizards...
  14583. >> either that or let creatures move, even if they belong to a dead
  14584. >> wizard.
  14585. > That would be a good enhancement. And change the dead revenge so that dead
  14586. > players keep control of the generated creatures.
  14587.  
  14588. * NEW FEATURE: I have now adjusted the code, such that if a creature exists
  14589.   who belongs to a dead wizard, the creature will still be moved as usual.
  14590.  
  14591. * DEAD REVENGE IMPROVED: I have now adjusted the code such that a wizard
  14592.   who is killed while posessing the Dead Revenge powerup will not lose ANY of
  14593.   his generators!  The wizard will die, but his generators will live on!
  14594.   And any creatures produced by the generators will be controllable by the
  14595.   player!  I forsee this as being strategically important primarily in
  14596.   multiplayer games where a certain wizard may be killed first, but can still
  14597.   have some influence in the game due to his generated creatures.
  14598.   For years I haven't even bothered casting Dead Revenge because it just
  14599.   didn't really seem to benefit me; there were always better spells to cast.
  14600.   Now however, I will always try to cast Dead Revenge!
  14601.  
  14602. * EDITED Dead Revenge spell description.
  14603.  
  14604.  
  14605.  
  14606. On 18-Aug-00, Frédéric Delacroix wrote:
  14607.  
  14608. > I have found a strange bug in the game related to the chaos lord and fire.
  14609. > It could be the fire shield (and possibly other shields) that's not working.
  14610. > Here are my notes.
  14611.  
  14612. > * BUG ! My wizard (an undead chaos lord, by the way, with shocker) was
  14613. > covered by its own fire breathed by one of my 3 platinum dragons, but it did
  14614. > not die !!! I destroyed the fire with another platinum dragon breath, and I
  14615. > could see a very very strange animation, alternating: my wizard (wizard 1),
  14616. > a grey elf (previouly dead) and the dead grey elf. I guess this is because
  14617. > the fire had 3 animation frames... ? When I query the stats, everything is
  14618. > back to normal chaos lord stats, except for life force who's back to 19.
  14619. > * No wait ! There's another big strange difference ! It's Wizard 1 belonging
  14620. > to nobody ! And it moved and attacked (but only shot once instead of three)
  14621. > with the independents ! He killed my cats ! What a strange creature ! I kept
  14622. > the autosave (083)
  14623.  
  14624. > * Actually it moves between me and my cats (I have the cat lord), not with
  14625. > the independents.
  14626.  
  14627.   JC: ok, I have investigated this and it all comes down to this:
  14628. * BUG: Fire Shield and Flood Shield DO NOT WORK!  Ack!  All these years
  14629.   Fire Shield and Flood Shield have not been working!  NOW FIXED.
  14630.  
  14631. Included Frédéric's new English and Français spell descriptions for
  14632. Power Walls and Webs.
  14633.  
  14634. --------------------------------------------------------------------------
  14635. New tiles from Xav:
  14636. Copied XMAN.IFF to UnusedGfx/Xman2.iff
  14637. Copied QUERY.IFF to UnusedGfx/
  14638.  
  14639. Included the new Camel, Fire Bat, Mnemicide, Nuke, Singular Earthbind and
  14640. Zombie gfx.
  14641.  
  14642. Ogre: I haven't decided what to do about the Ogre yet.  Maybe I'll use
  14643.       him as the Ogre Warrior?  He looks good, but he's not animated + I
  14644.       really REALLY like the shadow on the current Ogre.  I'll probably
  14645.       make him the new Ogre Warrior.
  14646.  
  14647. Orc: The orc looks great!  But the problem is that an orc is very wimpy in
  14648.      this game and he should not be so big.  He should be small and wimpy
  14649.      looking.  He can look good, so long as he is smaller to reflect his
  14650.      weakness compared to other creatures.
  14651.  
  14652. Do you think you could make a small creature to be the orc?
  14653. -------------------------------------------------------------------------
  14654.  
  14655.  
  14656. I went through Joseph's new gfx.
  14657.  
  14658. Included Joseph's new Mutate, Platinum Dragon, Pool, Recognomancer, Roper,
  14659. Tempest, Wizard 3 (just changed the black eyes to brown), Wizard 8.
  14660.  
  14661. The new Halfling looks good, but his helmet makes him look bigger.  We
  14662. really need the Halfling and Imp and Orc to be small creatures.
  14663.  
  14664.  
  14665. * FLAW: When a Tempest kills something, it doesn't make the dying noise and
  14666.   it doesn't print any text message either.  It just sort of disappears.
  14667.   NOW FIXED.
  14668.  
  14669. On 22-Aug-00, Frédéric Delacroix wrote: ---------
  14670. > * Garbage appears in the french translation when I have reveal in my spell
  14671. > list and the mouse pointer is over it. I get something like
  14672. > "RévélerÜF\«J­I@". I looked at the "Reveal" description file but it seems ok
  14673. > to me... ? This only happens with this spell.
  14674.  
  14675. JC: It is the very last spell.  The very last spell wasn't being
  14676.     NULL-terminated.  NOW FIXED.
  14677.  
  14678. > * When a creature has a negative combat statistic, it can heal other
  14679. > creatures. But the "m" key does not show it can move over friendly creatures
  14680. > to heal them.
  14681.  
  14682. NOW FIXED.
  14683. -------------------------------------------------------------------------
  14684.  
  14685. * BUG: If you shoot and kill your own wizard, when you end your turn,
  14686.   sometimes various random enforcer hits happen and always various random
  14687.   bits of memory get corrupted.  This was caused by MoveWizard() being
  14688.   performed on a dead wizard so it thinks the wiz is in cell -1 which
  14689.   causes many illegal mem accesses.  NOW FIXED.
  14690.  
  14691. August 28th, 2000: The electricity was out from around 2:00 a.m. to about
  14692. 7:40 a.m.  There was no light!  I couldn't see anything!  It was like
  14693. living in the dark ages!  I couldn't get on the internet!  And I couldn't
  14694. play Chaos!  I almost died!
  14695.  
  14696. * Included Xav's new Singular Earthbind, Dual Earthbind, Dragon Nest and
  14697.   Goblin / Goblin Bomb graphics.
  14698.  
  14699.  
  14700. * BUG: The archery effect randomly locks up the entire computer (sometimes).
  14701.   Using logfile code I was able to narrow it down to the following piece of
  14702.   code:
  14703.   DO_WHILE (px != tx)
  14704.      register double y = (double)(mx - px);
  14705.      AUDIONote (i--);
  14706.      MaskWritePixel (rastPort, px, (WORD)py - h + (WORD)(d * y * y));
  14707.      px += e;
  14708.      py += dy;
  14709.   LOOP
  14710.  
  14711.   I was unable to narrow it down any further.  I inserted more logfile code
  14712.   to prove for a fact exactly which line was causing the machine lockup but
  14713.   then the bug refused to happen.
  14714.  
  14715.   AUDIONote() and MaskWritePixel() are used countless times throughout the
  14716.   game and have proven themselves to be 100% reliable.  So what could the
  14717.   problem be?  What is different about this use of those routines and any
  14718.   other?  ANSWER: The animator task is STILL RUNNING during the archery
  14719.   effect!  During all other effects there is an ObtainSemaphore(&BoardLock);
  14720.   which prevents the animator task from running!  The archery effect would
  14721.   actually look better if it had an Obtain/Release Semaphore pair in it.
  14722.  
  14723.   Ok, but the main program and the animator don't share any variables that
  14724.   are changed anywhere EXCEPT for 1 thing:  The animator task contains the
  14725.   following code:
  14726.  
  14727.         AnimatorrastPortLayer=rastPort->Layer; // Disable clipping while we have a lock on the board.
  14728.         rastPort->Layer=0;             // No OS clipping = more SPEED.
  14729.  
  14730.   MaskWritePixel(rastPort,x,y) is using rastPort just like the animator is 
  14731.   using.  This is as it should be.
  14732.  
  14733.   So I theorize that sometimes task switching kicks in right in the middle
  14734.   of a OS WritePixel() call such that WritePixel() starts out using rastPort
  14735.   with a layer and ends up using a rastPort without a layer (or vice versa).
  14736.   And this somehow makes the OS go insane and crash.
  14737.  
  14738.   So how should I fix this?
  14739.   A) Add an ObtainSemaphore() ReleaseSemaphore() pair to the archery code?
  14740.   B) Comment out that layers disabling code in the animator task?
  14741.  
  14742. I am choosing option B for the following reasons:
  14743. 1. I don't ever want this bug to happen again!  Someday someone might code
  14744.    a new routine that does writes or reads from rastPort without getting a
  14745.    lock on &Board first!  Then the bug will be back!
  14746. 2. I don't have time to fiddle around chasing silly bugs like this so we'll
  14747.    just have to settle for an animator task that is now 10% to 15% slower.
  14748. 3. Now that I've implemented the fix, THAT MYSTERIOUS BLUE LINE THAT KEPT
  14749.    RANDOMLY APPEARING ON THE LEFT HAND SIDE OF THE BOARD IS GONE FOREVER!
  14750.    NOW FIXED!
  14751.  
  14752. * BUG: Strange blue line randomly appears on the left side of the board.
  14753.   NOW FIXED (see above).
  14754.  
  14755. * PROBLEM: Using default settings the music is playing during the bonus
  14756.   spell selection panel.  This causes JCsound to fail.  This doesn't hurt
  14757.   anything but it is disconcerting to the user to see messages in the cli
  14758.   window that say "ChaosDigitalSoundSubProcess failed returncode 150"
  14759.   so I have now changed the bonus spell panel to not attempt to play any
  14760.   sound effects if the music is playing.  NOW FIXED.
  14761.  
  14762. * Included Xav's Abduction graphic (the one with the flying saucer).  The
  14763.   only trouble is that the Abduction spell doesn't really abduct anyone.
  14764.   Abduction should really be renamed as BrainWashing or something.
  14765.   "Abduction" should be the same as Vanish but I can't think up a way to
  14766.   make it be different from Vanish. (?)
  14767.  
  14768.  
  14769. September 3, 2000:
  14770. * Included Joseph's new Eagle (2 extra frames), Skeleton (Added a few new
  14771.   frames), Dragon Nest (He thought it looked to much like a friendly little
  14772.   fireplace so he made it round.  It is now an interdimensional "portal"),
  14773.   Pegasus (1 extra frame), Crocodile (fixed the feet).
  14774.  
  14775. * FLAW: A Range Boosted or Aesculapiused Goblin loses some ability when
  14776.   killing an Archer and picking up the bow.  NOW FIXED.
  14777.  
  14778. September 11th, 2000:
  14779. * Included Xav's new Français setup screen I and II into the game.
  14780.  
  14781. * Sent v2.9d + A500 + Trumpcard 500 with 200 meg HD and 4 megs ram to
  14782.   Vivian in exchange for a SCSI CD-ROM drive and 2 Amiga Active Magazines.
  14783.  
  14784. * FLAW: If a person doesn't have narrator.device installed then the game
  14785.   won't play.  I have now removed all narrator.device dependencies so this
  14786.   is NOW FIXED.
  14787.  
  14788. * ADDED a new code module prefs.c to Load and Save user preferences in
  14789.   a plain ASCII file.  I just hacked and slashed sm.c into prefs.c.  This
  14790.   ended up still being a lot of work.  Over 1200 lines of code.
  14791.  
  14792. September 14th, 2000:
  14793. * New menu option: "Save Prefs"
  14794.  
  14795. * Changed Français info panel Tirer -> Tir.
  14796.  
  14797. Frédéric writes:
  14798. * "If you want to read about a spell, point at it and press "q" for Query."
  14799. I let it as is, but there's something you should be aware of: in the french
  14800. keymap, I must press "a" instead of "q" to get info. But this can change also
  14801. for other french-speaking countries. What you should do is use the
  14802. keymap.library (in ROM) to revert the wanted character into a wanted
  14803. keypress, so that the letter can be correct in all keymap configurations.
  14804.  
  14805. JC: Ok I did this and tested it and it works.  NOW FIXED.
  14806.  
  14807.  
  14808. * PROBLEM: Now that we have improved pearl.font for Chaos there can be a
  14809.   problem.  If a person already has the old pearl.font installed and is
  14810.   using it in his workbench or CED or whatever, then it will already be
  14811.   loaded.  Thus when Chaos attempts to load "pearl.font" it will load
  14812.   their old unimproved version since it is already in memory.
  14813.   Therefore I have now renamed pearl.font -> ChaosPearl.font and
  14814.    ran fixfonts on it.  NOW FIXED.
  14815.  
  14816. * Made documentation directories.  Copied the quickstarts into them.
  14817.  
  14818. * Added #?.prefs and Documention/ all to MakeDemoOfChaos.txt
  14819.  
  14820. * BUG: Justice randomly does the following:
  14821.   A: Doesn't work.
  14822.   B: Works
  14823.   C: Works but then awards a bonus spell on a creature that isn't supposed
  14824.      to give a bonus spell.
  14825.  
  14826.   IF (cell<0 or cell>=GAMESPACE) return
  14827.   cellp=&board[cell];
  14828.   cMR = cellp->char_stat.MR - MD;
  14829.  
  14830.   The above code sequence looks innocent enough.  But in fact is the work
  14831.   of EVIL.
  14832.  
  14833.   It was causing all the random errors of Justice, Dark Power, Vengeance,
  14834.   Exorcise etc.  There is a ; missing from the end of the first line
  14835.   therefore the 2nd line was never being executed.  NOW FIXED.
  14836.  
  14837.  
  14838. ************************************************************************
  14839.                          IFF Gadgets
  14840. ************************************************************************
  14841.  
  14842. The IFF gadget loading code:
  14843. Each gadget will be an IFF brush.  I must load each of these brushes into
  14844. an image struct.
  14845.  
  14846. 1. Open the IFF-file.
  14847. 2. Determine its x and y size.
  14848. 3. Allocate the memory for that
  14849. 4. Read it in and set up the struct Image for it.
  14850. 5. Poke these values into the gadget struct.
  14851.  
  14852. IMAGES:
  14853. 1. X
  14854. 2. Check
  14855. 3. Start
  14856. 4. Quit
  14857. 5. QuestionMark
  14858. 6. EndTurn
  14859. 7. RightHandSide (The texture of the right hand side of the board)
  14860.  
  14861. The right hand side thing is not really a gadget.  Its just a brush.  All
  14862. gadgets are brushes but not all brushes are gadgets.
  14863.  
  14864. GadgetImage[0] will be unused.
  14865. GadgetImage[1] to [7] will be used.
  14866.  
  14867. GadgetData[0] will be unused
  14868. GadgetData[1] to [8] will be pointers to the image data.
  14869.  
  14870. The data areas will each be a different size for each gadget.
  14871. So how do I handle the memory allocation and deallocation for all these
  14872. differently sized images?
  14873.  
  14874. A: Use AllocRemeber()  (Might cause some extra memory fragmentation)
  14875. B: Use AllocPool() (I heard this was bugged on OS 3.0 but there is no
  14876.    mention of any bugs in the OS 3.1 DevCD.)
  14877. C: Have another array of ints for the size of the data GadgetDataSize[0] to [7]
  14878.  
  14879. * I choose option C.  It seems easy enough.
  14880.  
  14881.  
  14882. Sept. 17th, 2000:
  14883. I have the gadgets in but the end turn gadget and question mark gadget have
  14884. a big black box around them.  There is no way to specify that color #0 (or
  14885. any other color) should be transparent.  This makes the right hand side
  14886. look awful.
  14887.  
  14888. Possible Solutions:
  14889. A: Write a special rendering hook function for my gadgets to draw them with
  14890.    the blitter in such a way as not to destroy the background.  I don't
  14891.    really know how to do this though.
  14892. B: Switch to using GadTools.library (I assume that gadtools gadgets can be
  14893.    specified as having a transparent color 0)  I don't know anything about
  14894.    gadtools though.
  14895. C. Simply redo the gadgets such that they have the backdrop built into
  14896.    themselves.  This is the easiest thing to do.  This also means that if
  14897.    someone redraws the right hand side then they must also redraw the
  14898.    EndTurn, QuestionMark and Mount gadgets to fit.
  14899.  
  14900. I will do C since I don't have to read any documentation or figure out
  14901. any paremeters or anything.
  14902.  
  14903. * Included Xav's new French versions of the Start and Quit gadgets.
  14904.  
  14905. * The game is now 99% playable in French.  Everything except the menus and
  14906.   docs has been translated.
  14907.  
  14908. * Added in those 2 gadgets for the hires screen.
  14909.  
  14910. * REMOVED the old hardcoded TickImage and CrossImage from Init.c/Init.h
  14911.  
  14912. ************************************************************************
  14913.                          End IFF Gadgets
  14914. ************************************************************************
  14915.  
  14916. * I antialiased Xav's new rotating Generator and included it into the game.
  14917.  
  14918. * Version 3.0 completed on September 20th, 2000.  It contains 904 tiles.
  14919.   Size of 3.0d executable is 339564 bytes.
  14920.   3.0d consumes 10.3 megs of hard drive space.
  14921.  
  14922. * UPLOADED v3.0d to Aminet on Thursday, September 21st, 2000.  My internet
  14923.   account has only been giving me around 300 cps lately, but I got 1100 cps
  14924.   while uploading chaos!  It's a miracle!!!
  14925.  
  14926.  
  14927. September 24th, 2000: Frédéric writes:
  14928. > * I cast "stone to flesh" on one of my dark wood trees and moved it next to
  14929. > an independent ghast. However, it did not get engaged to the ghast and I
  14930. > could not attack it on the same turn.
  14931.  
  14932. I could not exactly duplicate this bug.  When I moved my Dark Wood next
  14933. to any enemy it got engaged, however when I clicked on the enemy to attack
  14934. it, no sound was made and the graphical attack effect was not shown.
  14935. The attack actually did happen though.  The enemy lost the appropriate
  14936. 2 hit points.
  14937.  
  14938. This was caused by code that suppressed the attack sounds & gfx for the Dark
  14939. Wood (so as not to get boring and annoying when its SpecialCombat attacks 8
  14940. adjacent enemies).  I tweaked the code to only suppress the combat sound
  14941. and graphical effect when the Dark Wood is inanimate.  NOW FIXED.
  14942.  
  14943.  
  14944. * INTEGRATED Frédéric's improved asm music routines into the game.  The
  14945.   music system now resides in the dir AsmMusicSystem/
  14946.   I didn't know what to do with the file proplayer.a so I just left
  14947.   it out.  Everything seems to work ok but the subsong bug is still there.
  14948.   I did a simple memory leak test and a simple mungwall hit test.
  14949.   Everything seems ok.  We can now allegedly play MMD2 songs from Octamed
  14950.   Sound Studio Professional from 1 to 64 channels.
  14951.  
  14952. * FLAW: When you select a spell from your list, the erased area is 1 pixel
  14953.   to big.  NOW FIXED.
  14954.  
  14955. * ADDED part of the code to support PlayByEmail.
  14956.  
  14957. -----------------------------------------------------------------------
  14958. Problems caused by a bug in RestoreCellWizard() (It wasn't doing a BackUp()
  14959. it was just overwriting whatever was there)
  14960.  
  14961. * When the mount of a wizard is killed, it leaves no corpse behind.
  14962.   Tested and works perfectly.  NOW FIXED.
  14963.  
  14964. * When a wizard dismounts something onto a scroll, the scroll is destroyed.
  14965.   NOW FIXED.
  14966.  
  14967. * Above fix causes collapsing meditations to reappear once the wizard moves
  14968.   off of them.  NOW FIXED.
  14969. -------------------------------------------------------------------------
  14970.  
  14971. Frédéric bug reports for v3.0 +++++++++++++++++++++++++++++++++++++++++++
  14972. > * I had saved the preferences with Music off, but when I restarted the game,
  14973. > the music was switched back on. However, the menu "Music" was unchecked.
  14974. > When I selected it, another module was restarted, then I could switch the
  14975. > music off by reselecting the item. Seems you forgot to read this preference
  14976. > item before starting the music.
  14977.  
  14978. NOW FIXED.
  14979.  
  14980. > * The left amiga key acts as "q". Actually, I guess every keypress of a
  14981. > qualifier triggers the very last action done on the keyboard.
  14982.  
  14983. This was caused by the fact that MapRawKey() maps qualifier keys as
  14984. nothing.  That is it doesn't even put a 0 into the buffer.  So the buffer
  14985. was left holding whatever key was pressed last.  NOW FIXED.
  14986.  
  14987. END Frédéric bug reports for v3.0 ++++++++++++++++++++++++++++++++++++++++
  14988.  
  14989.  
  14990.  
  14991. WARNING:  You should not use illegal hacks of the "Automatically activate
  14992. any screen that is ever in front" variety.  This is simply improper and
  14993. just won't do.  Hacks like this will not crash Chaos but they will cause it
  14994. to behave in an annoying manner since hacks of this nature will constantly
  14995. activate the WRONG screen.  Do not use "AutoActivate FrontMost Screen" hacks.
  14996.  
  14997. Failure to heed the above warning may cause the screen scrolling to stop
  14998. working.  This will prevent you from reading certain lengthy spell
  14999. descriptions.
  15000.  
  15001. MCP has such a hack.  It should be turned off when playing Chaos.
  15002.  
  15003.  
  15004. * FIXED that rawkey problem on the 2nd creature info panel that prevented
  15005.   screen grabbing! (Pressing ANY key at all was clearing the screen).
  15006.   NOW FIXED.
  15007.  
  15008. * STUPID: Computer wizards senselessly cast Dark Wood trees adjacent to
  15009.   themselves.  I have now implemented more advanced AI for use with this
  15010.   particular spell so this is NOW FIXED.
  15011.  
  15012. * Several new predicates to support the new AI:
  15013. int AdjacentFriendlies(int source, int cell);
  15014. int AdjacentEnemyUndeads(int source, int cell);
  15015. int AdjacentFriendlyUndeads(int source, int cell);
  15016. int AdjacentEnemyWizards(int source, int cell);
  15017. int AdjacentFriendlyWizards(int source, int cell);
  15018. int AdjacentEnemyUndeadWizards(int source, int cell);
  15019. int AdjacentFriendlyUndeadWizards(int source, int cell);
  15020.  
  15021. * INTERLACE PROBLEM:  Sometimes AGA users complain that certain chaos
  15022.   screens are in interlace.  They want to make use of their AGA chips
  15023.   + their multisync monitors to produce a 100% solid flickerfree display.
  15024.   So I have now added a new cli startup option -d to force chaos to open
  15025.   all its screens in doublepal mode.  I also added a new startup script and
  15026.   icon so chaos can easily be started in DoublePal mode from now on.
  15027.   DoublePal modes are noninterlaced and flicker free.  NOW FIXED.
  15028.  
  15029. * ADDED Polski, Norsk, Svenska and Finnish to the language menu.
  15030.  
  15031. Complete info on Polish fonts and charsets is at
  15032. Aminet:docs/misc/PolishCharset.lha
  15033. --------------------------------------------------------------------------
  15034. September 27th, 2000: I _finally_ got a finished polski.catalog from Artur.
  15035.  
  15036. Here are the problems:
  15037. Scavenge -> Padlinoûerca is too long.  Can you think of a shorter word?
  15038. Scierwojad, Padlinozerca, Sëp (bird that eats dead animals), Mordobocie.
  15039. Padlinozercy (plural noun),
  15040. Fei says: Zerowac with dotted Z is a verb that is what I want.
  15041.  
  15042.  
  15043. Ranged Combat -> Walka Na Dystans is too long.  What is polski for "Shoot"?
  15044. Maybe "Shoot"->Strzelac or Strzal or Strzelanina would work better?
  15045. Or perhaps WalkaNaDystans?
  15046. Strzal for Shoot is what fei says to do.
  15047.  
  15048.  
  15049. Magic Resistance -> Odpornoôê Magiczna is too long.  How about
  15050. "Magic Resist" or "Resist Magic"? ??
  15051. Przeciwmagia=AntiMagic, Odpornosc na magie
  15052. Odpornosc mag. is the way fei says to do it.
  15053.  
  15054. ---------------------------------------------------------------------------
  15055.  
  15056. * ADDED new code to make the top half of the 2nd creature info panel fully
  15057.   stringwidth sensitive. (I had already done this with the bottom half).
  15058.   This allows the Polski translations to fit without overlapping. DONE.
  15059.  
  15060. * ADDED new code to make the text on the score screens fully stringwidth
  15061.   sensitive.  This allows the polski translations to fit without overlapping.
  15062.   The numeric columns are unchanged.  Seems to work ok.
  15063.  
  15064. * Implement translated menus:
  15065.   1. Make the strings into the catalog file and defines.h
  15066.   2. Change ChangeLanguage() to put in the correct text via Message(M_?) into
  15067.      each of the menu fields.
  15068.   3. Calculate the length of the menu name and of the longest string in the
  15069.      menu.
  15070.  
  15071.   The Intuition menus are now fully international and automatically adjust
  15072.   to the length of the strings in the menus.  ALL DONE
  15073.  
  15074. * Added code to center the translated strings of the demo over screen. DONE.
  15075.  
  15076. * Fixed spell descriptions for Hydra, Flood Shield, Marid and Protection.
  15077.  
  15078. ***********************************************************************
  15079.                 THE LINKER HAS ATTACKED ME AGAIN!!!
  15080. ***********************************************************************
  15081.     SLINK WITH temp_smk.tmp
  15082. Slink - Version 6.58
  15083. Copyright (c) 1988-1995 SAS Institute, Inc.  All Rights Reserved.
  15084.  
  15085. Error 502: _sprintf symbol - Distance for Reloc16 > 32768
  15086.  
  15087.   First Reference in Unit cast.c at offset 00003a04 in file 'cast.o'
  15088.   To Unit sprintf.c at offset 00001690 in file 'LIB:scm.lib'
  15089.   Caused by line 1929 in file cast.c
  15090.  
  15091.  
  15092.  
  15093. I added 200 lines of new code to cast.c today.  And this error started
  15094. happening.
  15095.  
  15096. I read the docs.  They say to compile the file with code=far.  But I
  15097. already do that.  I got this same error or a very similar one a few months
  15098. ago so I had to add code=far to the compilation of cast.c.
  15099.  
  15100. The docs also say that you can "declare the function to be far".  But
  15101. changing stdio.h prototype of sprintf sounds like a very bad idea.
  15102.  
  15103. So I tried to compile the whole thing with code=far.  I changed stdops to
  15104. include code=far so that ALL modules would be compiled with cod=far.
  15105. Then I did smake clean smake.  It all had no effect.
  15106.  
  15107. The docs say scm.lib is a lib of floating point stuff.  But I don't do any
  15108. sprintf floats in cast.c so I just totally don't understand this whole
  15109. entire thing.  The sprintfs in cast.c are all %s or %d.
  15110.  
  15111.  
  15112. So what am I supposed to do????
  15113.  
  15114. As far as I am concerned this must be a bug in the compiler or linker.  I
  15115. am compiling cast.c with code=far therefore there should simply not be any
  15116. 16-bit branches in it.  Therefore I should not ever get any 16-bit branch
  15117. errors.
  15118.  
  15119. Solution: Remove a bunch of code out of cast.c to make the code smaller.
  15120. I am transferring all routines having to do with scoring and sorting cells
  15121. for intelligent pit casting purposes into a new module IntelligentPitCast.c
  15122. This has the code for intelligent Pit, Magic Glass and Weak Wall casting.
  15123.  
  15124. This problem will probably resurface the next time I add in a bunch of new
  15125. spells.
  15126.  
  15127. Oh great!  Now the compiler says I have conflict between 2 variables!
  15128.  
  15129. I have
  15130. static int id;  in cast.c
  15131. static UWORD id; in IntelligentPitCast.c
  15132.  
  15133. and it says these vars are conflicting with each other!!!
  15134.  
  15135. This is scary!  They are supposed to be 2 completely different vars,
  15136. each local to their own file!
  15137.  
  15138. newl tested this same type of thing on gcc and it worked perfectly,
  15139. exactly the way that it should.  The 2 id vars were each completely
  15140. different and independent of each other and it compiled perfectly.
  15141.  
  15142. That's 2 major SASC bugs in 1 week! :(
  15143.  
  15144. Ok I have hacked and slashed my IntelligentPitCast.c code to only share
  15145. the vars that are absolutely needed in order to work around this evil bug.
  15146.  
  15147. But this could cause other very serious problems now, or in the future
  15148. (when I add another intelligence module) :(
  15149.  
  15150. Arrgh!  Now I'm getting multiply defined symbols.  It says every function
  15151. in IntelligentPitCast.c is multiply defined.  Ok this is because I had in
  15152. cast.c:
  15153. #include "IntelligentPitCast.c"
  15154. instead of the correct
  15155. #include "IntelligentPitCast.h"
  15156. So this variable conflict wasn't a bug after all!
  15157.  
  15158. But that Reloc16 > 32768 thing is still a bug in the compiler.
  15159.  
  15160. ***********************************************************************
  15161.                END THE LINKER HAS ATTACKED ME AGAIN!!!
  15162. ***********************************************************************
  15163.  
  15164. * Installed the new HUPL versions of all the fonts.  These are the standard
  15165.   gamefonts modified by Attila the Hun to have all Hungarian chars in the
  15166.   proper places and then modified by Frédéric Delacroix to contain all Polish
  15167.   chars in the proper places.  I then had Sau test the ChaosPearlHUPL font on
  15168.   his Amiga in Hungary using a Hungarian keymap and he reports all chars are
  15169.   there and everything is ok.
  15170.  
  15171.  
  15172. * New function to support the new AI: FirstAdjacentHumanAlly()
  15173.  
  15174. October 7th, 2000:
  15175. * FLAW: Deutsch.catalog on 2nd scroll info panel goes off the right edge of
  15176.   the screen.  Everything was working great with the English, Français and
  15177.   Polski catalogs But when I got the Deutsch.catalog it was going off the
  15178.   right-hand edge of the 2nd scroll info panel.  I have now changed that
  15179.   panel so that the left column is right against the left edge and the right
  15180.   column is right against the right edge.
  15181.  
  15182. * Goblin Bomb now picks up bows just like a regular Goblin.
  15183.  
  15184. October 8th 2000:
  15185. * Compiled v3.01d for Robin.  The main executable is 349900 bytes!
  15186.  
  15187. ######################### GOBLIN BOMB VOTING ##################################
  15188. Vote: If you shoot a scroll of a Goblin Bomb, do you want it to explode?
  15189.  
  15190. You may vote     for it to explode (+1 point)
  15191. You may vote against it to explode (-1 point)
  15192.  
  15193. Or any number in between.
  15194.  
  15195. James: +.25
  15196. Sean:  +.8
  15197. Joseph: -1
  15198. Zoltan: -1
  15199. Frédéric: -.75
  15200. Xavier:   -.25
  15201. JJ:     -1
  15202.  
  15203. Total: -2.95
  15204.  
  15205. * Changed/fixed Goblin Bomb to no longer explode when shot. October 11, 2000
  15206.  
  15207. * Also fixed it so that:
  15208. * Shooting a scroll of an Earthquake, Generator, Stone Golem or Stone Giant
  15209.   no longer shakes the screen.
  15210. * Shooting a scroll of a Hidden Horror no longer causes a Red Dragon to
  15211.   appear.
  15212. * Shooting a scroll of an Elemental no longer causes it to become its
  15213.   Elemental Form (water, fire, tempest, earthquake)
  15214. ####################### END GOBLIN BOMB VOTING ################################
  15215.  
  15216.  
  15217.  
  15218. **************************************************************************
  15219.                       BEGIN Ruthlessness Mode
  15220. **************************************************************************
  15221.  
  15222. When Ruthlessness mode is activated computer players will:
  15223. 1. Cast pits, magic glass, walls, rocks and miner willy more intelligently
  15224.    and aggressively.
  15225. 2. If they are an arborist they will cast shadow wood and dark wood trees
  15226.    in a more aggressive and intelligent manner.
  15227. 3. Whenever a creature is engaged it will always attack the strongest
  15228.    creature that it can acutally kill.  If it cannot make a kill then it
  15229.    will attack whichever enemy it feels is the most dangerous.
  15230. 4. A shooting creature will always attempt to shoot the strongest creature
  15231.    that it can actually kill.  If it cannot make a kill then it will shoot
  15232.    whatever enemy it feels is the most dangerous.  They never try to
  15233.    shoot a wizard who is inulnerable or has a reflector.
  15234. 5. A nonengaged ground creature will always check first if there is a path
  15235.    to any enemy wizard that it can kill.  If it cannot kill any enemy wizard
  15236.    then it will check if there is a path to any favorite-food creature that
  15237.    it can kill.  If it cannot kill its favorite food then it will check
  15238.    if there is a path to any bonus-spell creature that it can kill.
  15239.  
  15240.  
  15241.  
  15242. * Implemented new AI code for ruthlessness mode.  Now ruthless computer
  15243.   players will cast pits, magic glass, walls, rocks, miner willy, shadow wood
  15244.   and dark wood trees in a much more intelligent and aggressive manner.
  15245.   This took 600+ lines of code and quite a lot of time.  It added 7k+ to the
  15246.   size of the executable.
  15247.  
  15248. * Conducted various tests of the new ruthless casting code.  Everything
  15249.   seems to work ok.
  15250.  
  15251. * Implemented new AI code for ruthlessness mode. Now computer shooters
  15252.   shoot the strongest thing that they can kill.  If there is a tie then they
  15253.   shoot the most dangerous opponent.  Wizards will not shoot and kill a
  15254.   creature protected by Eye for an Eye.
  15255.  
  15256. * Conducted various tests of the new shooting code.  Seems to work ok.
  15257.  
  15258. * Implemented new AI code for ruthlessness mode.  Now engaged computer
  15259.   creatures attack the strongest thing they can kill.  If there is a tie then
  15260.   they attack the most dangerous opponent.  Wizards will not attack and kill
  15261.   a creature protected by Eye for an Eye.
  15262.  
  15263. * Conducted various tests of the new engaged attacking code. Seems to work ok.
  15264.  
  15265. * Implemented new AI code for ruthlessness mode: flying nonengaged creatures
  15266.   attack the strongest thing they can kill.  If they can't kill anything then
  15267.   they attack the most dangerous thing they can hit.  If there is nothing
  15268.   they can hit from their current position then they fall back to the old
  15269.   movement routine.
  15270.  
  15271. * Conducted various tests of the new nonengaged flying attacking code.
  15272.   Seems to work ok.
  15273.  
  15274.  
  15275. Implement ground-based nonengaged creatures seek a good kill. (wizard,
  15276. favorite food or bonus spell creature).  If they can't do any of those
  15277. things then they just fall back to the old movement routine.
  15278.  
  15279. I spent 2 hours thinking up an algorythm to allow creatures to find their
  15280. away around ANY set of obstacles to reach a desired goal.  I came up with a
  15281. recursive algorythm that would be ok for up to 6 movement points but it
  15282. would take several hours in the worst-cast scenario of 15 movement points
  15283. on an empty board on a 25 Mhz 030
  15284.  
  15285. So then I spent 1 hour thinking up a split "search from both ends" strategy
  15286. which would do 2 6 mp recursive searches.  One from the source and one from
  15287. the destination.  This would have allowed all paths up to 12 movement
  15288. points to be determined and would only take a few seconds in the worst-case
  15289. scenario.  Actually, I just realized this totally would not work at all
  15290. because there can be multiple desired destinations...  so it would only
  15291. work if there was only 1 desired destination.
  15292.  
  15293. With optimizations for not retracing steps and not taking paths for which a
  15294. shorter route already existed I could do 7 mp search with no problem.
  15295.  
  15296. Then I spent 2 hours coding the above routine and I began to
  15297. realize how amazingly inefficient a recursive search was.  yuk...
  15298.  
  15299. So then I spent 3 more hours inventing a new search algorythm that is not
  15300. recursive and is amazingly fast!  It should be able to determine the BEST
  15301. path to all points on the board in around .025 seconds on 25 Mhz 030. If
  15302. the board was 4x larger than it currently is then it should take about .1
  15303. seconds.  6 more hours of coding and it was ready to be tested.
  15304.  
  15305. A couple of days later: well I had to make some adjustments and things to
  15306. make everything work within the realm of Chaos.  But now that it is done,
  15307. IT IS TOTALLY AWESOME!  I built some complicated mazes and then pressed the
  15308. "m" key and it correctly showed all the places I could and could not move
  15309. to!  I kept randomly deleting pieces of walls and putting new walls elsewhere
  15310. in an attempt to confuse it but it worked every time!  WAY COOL!
  15311.  
  15312. I had always been planning on optimizing the C code to make it go faster,
  15313. or to rewrite it in asm if needed but it goes SUPER FAST on the very first
  15314. try!  So there is really no reason to optimize it at the present time.
  15315. It is fundamentally a very efficient algorythm.
  15316.  
  15317. I can now theoretically program computer creatures to find a path to any
  15318. desired goal.  However each goal that is searched for will have to be
  15319. specially programmed in.
  15320.  
  15321. This algorythm only finds clear paths to every square on the board.
  15322. This algorythm does not currently try to calculate any sort of "hack your
  15323. way through these certain barriers to reach your goal" type of stuff.
  15324.  
  15325. This algorythm takes into account the fact that once you are engaged you
  15326. can attack any adjacent square, even if you only have .1 movement points
  15327. left.
  15328.  
  15329. * BUG: There has always been a bug in the game whereby if you move some
  15330.   squares and then have only .5 to .9 movement points left it lets you move
  15331.   another full square!  This is cheating!  It takes 1 whole movement point to
  15332.   move in a straight line and 1.4142 movement points to move diagonally!
  15333.   I have now changed the inappropriate occurrences of "0.5" in move.c and
  15334.   cmove.c to say "1.0" now.  However, you can still cheat and step diagonally
  15335.   on your last move when you only have 1 movement point left.  SORT OF FIXED.
  15336.   I will work out a way to fix this last flaw later.  Later: ok the
  15337.   movement system now works exactly the way it should. This is all 100%
  15338.   NOW FIXED.
  15339.  
  15340. * IMPROVED cmovenonengaged() to take an extra path parameter.  When this
  15341.   parameter is not NULL, the movement information comes from the path rather
  15342.   than the ChooseDestination() function.  This way anytime I have calculated
  15343.   a path for a creature to follow I just keep calling cmovenonengaged() to
  15344.   make it follow the path.  This way I am using the EXACT same movement code
  15345.   for both normal movement and path-following movement.  So everything
  15346.   should always work perfectly.
  15347.  
  15348. * Ok, I've got the path code in and working and computer-controlled
  15349.   creatures can now follow complicated paths to their destination.  As I
  15350.   watched a 14 movement-point Hydra navigate a complicated obstacle course on
  15351.   his way to kill an a Generator I noticed the following 2 bugs in the old
  15352.   original computer movement routine:
  15353.  
  15354. * BUG: The computer movement routine deducts 2 movement points for each
  15355.   diagonal move instead of the correct 1.4142!  This applies to computer
  15356.   creatures AND computer wizards!  NOW FIXED.
  15357.  
  15358. * BUG: The WRONG movement point value is shown all the time.  It was taking
  15359.   the actual movement points left and rounding them DOWN to the nearest lower
  15360.   integer. NOW FIXED.
  15361.  
  15362. * Line 58 and 59 in the catalog file are no longer used.  They only showed
  15363.   movement points as (wrong) integers.  Line 91 is now used instead.
  15364.  
  15365.  
  15366. * Added code so that nonengaged exposed wizards will run into an unoccupied
  15367.   meditation if possible.
  15368.  
  15369. * Modified "m" key to work, even in the middle of a creature's movement!
  15370.   I've been wanting this feature for years!  I finally did it!  And now
  15371.   that I've fixed all those 10 year old bugs in the move routines the m-key
  15372.   highlighted squares now agree perfectly with the printed numerical value at
  15373.   the bottom of the screen and with how far you _actually_ get to move your
  15374.   unit.
  15375.  
  15376. * FIXED FindAllPaths() to handle mounts + level 2 mounts when the SourceCell
  15377.   contains an exposed wizard. (It already handled meditations).  DONE.
  15378.  
  15379. * FIXED "m" key ground movement to handle mounts and level2 mounts + ride.
  15380.  
  15381. * FIXED "m" key flying movement!  Just use the old code. DONE.
  15382.   (FindAllPaths is only for ground movement.)
  15383.  
  15384. * FIXED "m" key flying movement to take into account
  15385.   "WillIGetEngagedIfIMoveThere".  This way cells which you cannot directly
  15386.   fly to, but you can fly next to them, become engaged and then attack them
  15387.   will now be correctly highlighted.
  15388.  
  15389. * Modified io.c to load/save Ruthlessness var finally.
  15390.  
  15391. At the beginning of the Ruthlessness upgrade cmove.c was 24.5k in size.
  15392. Now it is 61.5k!
  15393.  
  15394. **************************************************************************
  15395.                       END Ruthlessness Mode
  15396. **************************************************************************
  15397.  
  15398.  
  15399. Robin Schmidt writes:
  15400. > The Pyrohydra has combat 15 and ranged combat 5.
  15401. > But the discription tells me that the breath fire of the pyrohydra is one
  15402. > of the strongest. I suppose you swaped the numbers?
  15403.  
  15404. Wow!  What a cool bug you found!  I swapped the numbers back around.
  15405. NOW FIXED.
  15406.  
  15407.  
  15408.  
  15409. > 1. When questioning a cloaked object, the German text is too long.
  15410. > We need a line feed + carriage return 8-)
  15411.  
  15412. It took me 90 minutes to hack and slash an AntiAliasWriteTextLength()
  15413. function together for this purpose.  NOW FIXED.
  15414.  
  15415.  
  15416. > Just had a game: I played with four wizards in my team against four computer
  15417. > wizards and four generators. Everything enemy to me is destroyed. I attached
  15418. > the savegame. When I cast the seperation spell the fight can go on, but why
  15419. > doesn't the game finish now? My team has won!
  15420.  
  15421.  
  15422. Team/Alliances and ending the game.
  15423.  
  15424. End of Game Check will do:
  15425. IF (everyone alive on the board is on the same team) THEN
  15426.    IF (all of those people were ORIGINALLY on the same team at the start of the game) THEN
  15427.       (The game is over, that team wins!)
  15428.    ELSE
  15429.       ? FD says to do nothing because this can make the game last a very
  15430.         long time and force a player to sacrifice multiple dragons via
  15431.         Justice/DarkPower/Vengeance in order to get bonus spells that allow
  15432.         for killing an unwanted allied wizard.
  15433.    END_IF
  15434. END_IF
  15435.  
  15436. * Above code implemented.
  15437.  
  15438. * BUG: Team[] gets saved and loaded with the savegame file but not
  15439.   TeamSettings[]!  I have now fixed this, this means the savegame format
  15440.   has changed again.  I am deleting all my old saved games and I am
  15441.   converting all the levels to the new format. NOW FIXED.
  15442.  
  15443.  
  15444.  
  15445. > 2. The Nightmare has a combar value of 1? I think it should be higher, for
  15446. > 'it's feet are burning hot' or something like that.
  15447.  
  15448. I just deleted the sentence
  15449. "They attack with their hooves which are burning hot."
  15450. from the spell description so this is NOW FIXED.
  15451.  
  15452. Of course now I will have to convince all the translators around the world
  15453. to upgrade to the new spell description... 8/
  15454.  
  15455. > 3. I cast the Dead
  15456. > Revenge spell on my wizard and he is killed. Now the game asks if I really
  15457. > want to play on or start another game ('Do you really want to start a new
  15458. > game?')! I say no and see the generator - MY generator. But my old monsters
  15459. > are asleep, I cannot do anything. And with the end of the next turn the game
  15460. > asks again: Do you want to go on? Nay, me says and lo! there my generator
  15461. > produces a Goblin for me. I can DO something - I can MOVE. But anyway the
  15462. > game asks me if I want to play another game. Then I reached turn 24 and
  15463. > everything was out - strange tale, isn't it...;-)
  15464.  
  15465. hahahahheheehheha this sounds very funny! 8)
  15466.  
  15467. Here's the deal: When all human wizards are dead the game is supposed to be
  15468. over.
  15469.  
  15470. Dead Revenge
  15471. lets you have some small amount of influence in the game so long as there
  15472. are other human players in the game.  This presumably allows you to take
  15473. some revenge on the human wizard who killed you so that (hopefully) you can
  15474. weaken him and make some other human player or computer player or even the
  15475. independents win.
  15476.  
  15477. You are the very first player (besides myself) to test the new Dead Revenge
  15478. spell.  For years Dead Revenge didn't let you take ANY revenge at all!  It
  15479. just let you die and then gave the _independents_ a new generator in your
  15480. place!  If you died at the hands of the independents then this was doubly
  15481. unjust!
  15482.  
  15483. If you aren't going to play Chaos with all those visitors at your house
  15484. then you could try playing where you yourself control 2 different wizards
  15485. on a team against 4 computer wizards on a team.  In such a game the Dead
  15486. Revenge spell would work as you would like it too. (Although there is a
  15487. theory espoused by certain Chaos Players that says something about it being
  15488. a bad idea to let your wizard die in the first place 8)
  15489.  
  15490. Btw: Frédéric wants me to somehow rig the replacement generator to have a
  15491. chance of generating your wizard back into the game.  I haven't really
  15492. worked out how that would work yet....  I am thinking that after X number
  15493. of turns it would automatically generate your wizard back into the game.
  15494. I'm thinking a number like X=20 would work well.  I think this would be
  15495. unbelievably cool in a large multiplayer game.
  15496.  
  15497.  
  15498. > Another question: When calling the About window it says: 'Return Of The
  15499. > Wizards'? Why?
  15500.  
  15501. I asked myself that same question the first time I saw it.
  15502.  
  15503. The answer is:
  15504. It is a reference to the facts that:
  15505. 1. There were powerful wizards in ancient times, but their knowledge was
  15506.    mostly lost over time.
  15507. 2. The game takes place in the far flung future when scientists have
  15508.    rediscovered and reinvented the magical powers that were once commonplace
  15509.    in Atlantis, ancient Egypt and other lost civilizations.
  15510.  
  15511. Didn't you ever wonder how the Pyramids were built?  Well its pretty darn
  15512. easy when you have complete control over a Brontasaurus.  Whole teams of
  15513. Brontasauri even.
  15514.  
  15515. But dinosaurs really eat a lot... and they severely overgrazed the land...
  15516. giant dust storms ensued... the entire area turned into a desert.  A
  15517. terrible ecological disaster from which they still have not recovered 5000
  15518. years later.
  15519.  
  15520. It says "Battle of the Wizards" in some places and "Return of the Wizards"
  15521. in other places.  I was thinking of having it say "Wizard Wars" or
  15522. "Strategy Game of the Century" or ?  But it seems ok like it is.
  15523.  
  15524. October 19, 2000:
  15525. * CHANGED spell descriptions of: Bat, Nightmare, Virtue.
  15526.   Sent them to FD and SF.  Included new FD French versions.
  15527.  
  15528. * ADDED code to keep track of total time spent playing chaos and total
  15529.   number of turns played.  Now I just have to decide where I will display
  15530.   this information.
  15531.  
  15532. October 20, 2000:
  15533. * Sent v3.01 to FD for betatesting.
  15534.  
  15535. * INCREASED the code to keep track of total time spent playing chaos to
  15536.   keep seperate totals for each of the 8 players + the independents.
  15537.  
  15538. * Added code to switch to the HUPL font when selecting Hungarian or Polish
  15539.   from the Language menu.
  15540.  
  15541. * Chaos release executable is now 368704 bytes in size.
  15542.  
  15543. * The toe of the Babboon is all messed up. NOW FIXED. + I drew some blood
  15544.   on the dead body. 
  15545. * Pieces of the Skeleton animation were not antialiased.  NOW FIXED.
  15546. * Amphisbaena is all messed up! NOW FIXED.
  15547.  
  15548.  
  15549. ********************* BEGIN Robin Stuff *******************************
  15550. Robin writes:
  15551. > 4. I think the Goblin Bomb makes it too easy to kill generators. Try it:
  15552. > Place a Goblin Bomb next to a generator. Shoot at it until it dies.
  15553. > Destroy the generator with any adjectant creature (even an orc).
  15554. > It's far too easy!?!
  15555.  
  15556. Well in a "real" game with say 8 generators it isn't so easy.  I mean,
  15557. first you have to _get_ the goblin bomb next to a generator.  This is easy
  15558. if your wizard is standing next to a generator but if you are standing next
  15559. to a generator in a normal game then you are probably going to get killed
  15560. very soon.  Perhaps this is why you like Dead Revenge so much? 8) hehehe
  15561.  
  15562. Ok so if you are a safe distance away then you have to walk your
  15563. Goblin Bomb up to the generator and it will be very challenging to get
  15564. him there without some independents killing him prematurely.
  15565.  
  15566. Also, I have found that it is quite challenging to get a Goblin Bomb into
  15567. position without at least taking some damage onto my own creatures.
  15568.  
  15569. And lets say that you are such a good tactician that none of what I have
  15570. just said applies to you.  Well its ok for it to be "easy" to kill 1 or 2
  15571. generators in a game.  Its the only way to survive when playing against 16
  15572. generators!
  15573.  
  15574. And lots of times I've had Goblin Bombs but no shooting creatures.  So I
  15575. get my Goblin Bomb into position and then some bozo comes along and kills
  15576. him!  Then they kill the generator!  So I don't get any bonus spells for
  15577. it!
  15578.  
  15579. > My dear, you talk too much. But what is most anoying - you are right. So we
  15580. > leave the topic.
  15581.  
  15582. > Now my great BUG!!!:
  15583. > Yesterday (or tomorrow, don't know) I got the Touch Of GOD (nice one 8-)! So
  15584. > I made my Wood Elf a godlike creature. A when it moved around killing here
  15585. > killig there killing everywhere it suddenly was promoted to a Dread Elf
  15586. > (ooohh, how dreadful)! But then I saw that his life force was decreased, and
  15587. > so were Magical Resistance and healing capabilities! That's no good, my
  15588. > dear. And I presume this 'feature' can be used with any promotable creature
  15589. > that is under the Armour and Protection spells. No other values were changed
  15590. > though, so my dread elf was still of much use to me...
  15591.  
  15592. Ok I read over the code that controls this and I see no possible way this
  15593. could happen.  All the stats are promoted the same way so they should
  15594. either all promote correctly or none of them should promote correctly.
  15595.  
  15596. So I played a test game and cast Touch of God onto my Wood Elf.  On the 4th
  15597. kill he was promoted to a Dread Elf.  The only thing wrong with him was
  15598. that his manuverability didn't promote right (I forgot to promote that stat
  15599. in the code).  So the Manuverability stat promotion is NOW FIXED.
  15600.  
  15601. The only thing I can figure is that your Dread Elf was attacked by a
  15602. creature (while you weren't looking) that caused the leben damage.
  15603. Possibly your Dread Elf was attacked by something holding a Poison Dagger,
  15604. that would mess up your leben recovery rate.
  15605. And that you just mixed up manuverability and magic resistance.
  15606.  
  15607. > NO! There
  15608. > was another thing I forgot to tell you: The Leben (you have to write it with
  15609. > a capital letter in German 'cause it's a noun...) value was increased by
  15610. > using the Armour spell (which was called by the Touch Of God, I think), and
  15611. > then, when I call the info panel, I see from the pictures, what happened to
  15612. > my elf (there were the Red Cross, the Shield, the Range Boost Arrow and...
  15613. > and the Armour). After he was promoted, there wasn't any Armour sign any
  15614. > more! Im totally sure about that!
  15615.  
  15616. The Armor sybmol is algorythmically generated each time you look at the
  15617. info panel.  If your life is 15 points higher than your normal maximum then
  15618. it draws the Armor symbol.  Several other symbols work in a similar
  15619. fashion.
  15620.  
  15621. So your Touched by God Wood Elf had probably taken a few hits during his
  15622. conquests right?
  15623.  
  15624. Lets say he had taken a few hits and was down to only 50 life points.
  15625.  
  15626. Well when he got promoted to a Dread Elf his normal life would be 39 life
  15627. points but he still keeps his 50.  50 is not 15 higher than 39 so it would
  15628. stop drawing the Armor symbol.
  15629.  
  15630. Dread Elves come with 39 life points built-in.  So for it to draw the Armor
  15631. symbol would require him to have 54 life points or more.
  15632.  
  15633.  
  15634. There are still lots of strange things in the game that you haven't found
  15635. yet. And some secret things too.
  15636.  
  15637. > I just found one: I made my Magic Wood
  15638. > walk via StoneToFlesh. I boosted it a little bit with some Combat training
  15639. > and tried to attack the next wizard. Well it worked fine, but then the
  15640. > wizard just entered my Magic Wood and disappeared! I could still move my
  15641. > Wood and attack, but the wizard remained in it. Some turns later my wood was
  15642. > destroyed from within by the evil wizard and he got a spell. :-(
  15643.  
  15644. Hehehehe
  15645.  
  15646.  
  15647. *************** END Robin Stuff ******************************************
  15648.  
  15649. *************** BEGIN Frédéric Stuff *************************************
  15650. FD Writes:
  15651. > I saw once (I think it was when a wizard had just been killed) a string
  15652. > like "Movement points= -98.50). I can't remember the exact circumstance
  15653. > unfortunately.
  15654.  
  15655. I looked over the code and I only saw 1 place where this could be
  15656. theoretically possible so I rewrote that piece of code.
  15657. ALLEGEDLY NOW FIXED.
  15658.  
  15659.  
  15660. > * Something has changed about shadow wood. It seems to me that they don't
  15661. > attack anymore when computer-controlled.
  15662.  
  15663. The code used to erroneously say (This used to let people cheat and move 1
  15664. extra square sometimes.)
  15665.         DO_WHILE (moveleft >= 0.5)
  15666.  
  15667. So I erroneously changed it to:
  15668.         DO_WHILE (moveleft > 1.0)
  15669. Which prevents things with exactly 1 movement point from moving.
  15670.  
  15671. Now I changed it to the proper:
  15672.         DO_WHILE (moveleft >= 1.0)
  15673.  
  15674. NOW FIXED.
  15675.  
  15676.  
  15677. > * I cast alter reality on a wizard's mount and it was turned into a
  15678. > goblin bomb. However, the goblin bomb did not explode when I killed
  15679. > it. It should explode, but should the riding wizard be harmed too ? I
  15680. > think so but ?
  15681.  
  15682.  That's hilarious!  You come up with the weirdest stuff! :)
  15683.  
  15684. 1. Goblin Bombs have never done the explosion effect on empty cells.
  15685.    I did not attempt to change this.  But someday I would like to have just
  15686.    *1* really BIG, 9-tile big (3x3) nuclear explosion animation that we can
  15687.    use as the cell effect animation for this effect.  Or actually it could be
  15688.    ANY animated explosion whatsoever.
  15689. 2. With clever rewriting of the Reinstate() function I was able to make
  15690.    mounted Goblin Bombs explode as usual.  NOW FIXED.
  15691. 3. Goblin Bombs have never harmed the cell that they are in. I have now
  15692.    hacked in some extra code so that they now damage a mounted wizard.
  15693.    Same thing for the Volcano.  NOW FIXED.
  15694.  
  15695. ****************** END Frédréric stuff *************************************
  15696.  
  15697. October 26, 2000: Sent a new v3.01 to FD for betatesting the AI.
  15698. Executable filesize = 368892.
  15699.  
  15700. Sent a new v3.01 to SAI for betatesting the AI.
  15701. Executable filesize = 386456  This means the level editing code is 17564
  15702. bytes in size.
  15703.  
  15704. =========================================================================
  15705. FD Writes:
  15706. > * I vanished a horse into the future, and it reappeared some turns later in
  15707.  
  15708. You vanished a horse??  Was this a really BIG, bad, scary horse or
  15709. something?  :)
  15710.  
  15711. > the rightmost column. But the drawn area was 1 pixel too wide, damaging the
  15712. > spell selection graphics. This was refreshed very quickly though. Actually,
  15713. > this seems to happen everytime something is drawn in the last column.
  15714.  
  15715. I think it only happens during the CellEffects TELEPORTIN and TELEPORTOUT.
  15716. NOW FIXED.
  15717.  
  15718.  
  15719. > * When a creature gets promoted, its manoeuvrability recovery is reset, not
  15720. > kept.
  15721.  
  15722. NOW FIXED.
  15723. ==========================================================================
  15724.  
  15725.  
  15726. October 29th, 2000:  I voted straight Libertarian.  I also voted against
  15727. the lame "Arena Proposal" to give millions of tax dollars to the Houston
  15728. Rockets & Comets basketball teams.
  15729.  
  15730. -----------------------------------------------------------------------
  15731. FD Writes:
  15732.  
  15733. > * A sleeping ghoul is still animated and scavenging. I can't remember
  15734. > exactly how it happened, but this could be due to impurities.
  15735.  
  15736. NOW FIXED.
  15737.  
  15738.  
  15739. > * If a computer wizard has a solar, then the solar does not move.
  15740.  
  15741. NOW FIXED.
  15742.  
  15743.  
  15744. > * I noticed that since you introduced the new dead revenge, when a creature
  15745. > changes side to that of a dead wizard (haunt or impurities), this wizard
  15746. > gains control of it, even though he did not cast dead revenge when he was
  15747. > alive. Is it a wanted effect ?
  15748.  
  15749. Yes, this is a wanted effect.  The new rule of the game is that if a
  15750. wizard owns things on the board that are not asleep or dead or a scroll
  15751. then he gets to use them as usual.  Even if the wizard himself is dead.
  15752.  
  15753. This is what allows Dead Revenge to be such a useful spell now.
  15754.  
  15755. > * Unless I missed something, when I cast a vortex on a corpse, the corpse is
  15756. > destroyed when the vortex moves. It should either be vanished, or left
  15757. > behind.
  15758.  
  15759. This is a game secret.  Just because the corpse is not there when the
  15760. vortex moves does not mean it is destroyed.  Can you figure out where the
  15761. corpse has gone?
  15762.  
  15763.  
  15764. > * In one of the first emails we exchanged, you told me you'd change the
  15765. > magic knife to improve combat by only 2 points instead of three so that it
  15766. > is really different from magic sword. It seems to me it still adds 3 points.
  15767.  
  15768. Someone must have cast vodka on you again.  You are imagining things again
  15769. :)
  15770.  
  15771. Wait till you sober up then try casting Magic Knife again and you'll see
  15772. that it works properly. :)
  15773.  
  15774.  
  15775. > * It would be nice, in the bonus panel, if the number of spells to pick was
  15776. > decreased each time I pick a spell.
  15777.  
  15778. NOW DONE.
  15779.  
  15780. > * During spell selection, when I press "c", it shows me where I can cast the
  15781. > spell under the mouse pointer. But then I must click elsewhere to be able to
  15782. > press "c" again on another spell. It would be nice if we could press "c" on
  15783. > different spells without having to click in between.
  15784.  
  15785. This is a problem with _all_ keypresses, not just the "c" key.  Originally
  15786. I programmed all keypresses to work exactly the way you describe.  Then one
  15787. day Sean changed it.  I didn't like it but I assumed he had a good reason
  15788. for it so I decided not to mess with it until someone complained about it.
  15789. NOW FIXED.
  15790.  
  15791. END FD Writes.
  15792. ------------------------------------------------------------------------
  15793.  
  15794. * November 1, 2000: Sent v3.01d (19) to Artur Chlebek for testing the Polski
  15795.   translation of the .catalog file and the HUPL fonts and the Screens/Polski/
  15796.   The executable was 369192 bytes.
  15797.  
  15798. * Included Stephen's Magyar spell descriptions A-Z.  They still need
  15799.   to be spell-checked.
  15800.  
  15801. * Robin wants a special version with a time delay on what the wizards are
  15802.   saying/thinking during their spell-selection AI. Sent v3.01d (24) specially
  15803.   modified to him.
  15804.  
  15805.  
  15806. November 2, 2000:
  15807. Artur Writes:
  15808. > It seems that there is something wrong with support for HUPL fonts - I
  15809. > checked them in DPaint and all polish chars are OK and in proper
  15810. > "places". But Chaos doesn't seem to use them - only script font
  15811. > (ChaosHUPL) seems to be used when proper option is enabled. All other
  15812. > fonts (ChaosCalligraphy & ChaosPearl)  seems to be used in original
  15813. > versions - not their HUPL equivalents. :/
  15814. >> Can you give me an example string where the char is wrong and I will
  15815. >> check this.
  15816. > /"Name/ wybierz zakl_e_cie." (polish equivalent of "/Name/ select your
  15817. > spell.") - underlined "e" has some 2 dots on the top of it, while it
  15818. > should be a mix of "e" & ",".
  15819.  
  15820. The problem was that I closed the old fonts and opened all the new ones
  15821. correctly but that is not enough.  The fonts must be plugged into every
  15822. rastport and screen in the game.  NOW FIXED.
  15823.  
  15824. * Sent a new v3.01 (20) to Artur for testing the fixed HUPL font support.
  15825.   executable filesize = 369668.
  15826.  
  15827. * FLAW: In Ruthlessness mode, flying creatures seem to take about 6x longer
  15828.   to move than in regular mode.  This is noticeable on my 25Mhz 030 but
  15829.   perhaps not noticeable on faster machines.  NOW FIXED.
  15830.  
  15831. * FLAW: The "m" key can take up to 1/3 of a second.  The above fix now
  15832.   makes the "m" key around 10x as fast (in other words, back to being as
  15833.   fast as it was supposed to be).
  15834.  
  15835. * FLAW: Computer creatures in Ruthlessness mode take up to 6x longer to
  15836.   decide who to shoot.  NOW FIXED.
  15837.  
  15838.  
  15839. FD Writes:
  15840. > * A (allied) computer wizard cast 3 pits around a generator in a corner. He
  15841. > had 5 pits left to cast, and he could do so around a generator on a border,
  15842. > but he chose to cancel the spell.
  15843.  
  15844.   He didn't actually cancel the spell.  He cast the wall pieces into
  15845.   various parts of your computer's memory :) This triggered jillions of
  15846.   enforcer hits on my machine.  This bug  happened when a computer player
  15847.   tried to surround something that was on the edge of the map.
  15848.   ALL NOW FIXED.
  15849.  
  15850. While watching the computer cast Weak Walls in FD's supplied autosave, at
  15851. first I thought that the computer was casting them a bit strangely.  He
  15852. could have cast just *1* pit into the upper left corner and that would have
  15853. completely blocked off 1 generator.
  15854.  
  15855. But then I carefully examined what the computer player did and I realized
  15856. that _EVERY_ wall that he cast blocked off a generator!  One of the walls
  15857. even blocked off *2* generators!  And all the generators that he blocked
  15858. were closer to him than that obvious one in the corner!  So he was actually
  15859. being rather intelligent about the whole thing.
  15860.  
  15861.  
  15862.  
  15863. > * When Virtue kills a bonus creature (white dragon, stone golem etc), no
  15864. > bonus spell is awarded.
  15865.  
  15866.   NOW FIXED.  Btw: There are only 3 bonus spell creatures that Virtue
  15867.   currently kills: White Dragon, Stone Golem and Air Elemental.
  15868.  
  15869. * FLAW: No points are awarded for killing creatures with Virtue.  NOW FIXED.
  15870.  
  15871. > * An independent red dragon was engaged to one of my undead inanimages, but
  15872. > he was also adjacent to my dragon nest, which was the only object he could
  15873. > attack. However, he did not attack the dragon nest, he just shot it. This
  15874. > makes me think he tried to attack the undead inanimage, which is stupid
  15875. > since the dragon is intelligent enough to see it's an undead.
  15876.  
  15877.   This is a flaw that has always existed.  NOW FIXED in both normal mode
  15878.   and Ruthlessness mode.
  15879.  
  15880.  
  15881. > * My wizard just vanished because of impurities ! First time I see this !
  15882.  
  15883. Actually the line of code that allowed impurities to vanish things was
  15884. commented out for some reason.  I have just now reinstated it.
  15885.  
  15886. > Actually, he was vanished by an independent chronomancer.
  15887.  
  15888. HOORAY for the Chronomancer!!!!!  He actually did something useful!  He
  15889. vanished your most valuable asset!
  15890.  
  15891. > The trouble is
  15892. > that 1) he has not reappeared for a very very long time. I guess this is
  15893. > because there are no empty cells on the board. They all have at least a
  15894. > corpse. 2) I don't have access to the menues to quit the game 3) What if the
  15895. > board was full of independents ? The game would never end and I would never
  15896. > get the chance to select a menu !
  15897. >
  15898. > * I'm now on turn 148 and my wizard still hasn't reappeared. He was vanished
  15899. > around turn 80 ! I'm including the autosave. I think this is because the
  15900. > world is full of corpses. The vanished objects should be given a chance to
  15901. > reappear on a corpse after, say, 10 turns, or in place of another (random)
  15902. > object that would be vanished in turn.
  15903.  
  15904. Ok I have investigated the WarpIn() code that controls the reappearance of
  15905. warped creatures and yes, indeed your problem was caused by all those
  15906. corpses.  Here is how the code worked:
  15907.  
  15908. After WARPTURNS have passed, each turn try ONCE to reappear the creature
  15909. onto the board.  This was done by randomly selecting a square on the board.
  15910. If the square is not TOTALLY EMPTY then too bad for you.  You don't get
  15911. another chance to reappear until the next turn.
  15912.  
  15913.  
  15914. So in your game if there were only 5 completely empty squares on the board
  15915. then you would have only 5 chances out of 238 of reappearing each turn.
  15916.  
  15917. Ok, I have now completely rewritten WarpIn() to do the following:
  15918. After WARPCOUNT turns have passed then the object in question WILL reappear
  15919. randomly onto some completely empty square.  If there are no completely
  15920. empty squares then the object WILL randomly reappear on top of some corpse,
  15921. thus destroying the corpse.  If there are no corpses anywhere on the board
  15922. then some random thing will be WarpOut()'ed then the object in question
  15923. will be WarpIn()'ed to that now empty square.
  15924.  
  15925. I tested this new code on FD's supplied savegame.  NOW FIXED.
  15926.  
  15927.  
  15928.  
  15929. > * When a creature which has +4 scavenging and only 1 point to heal, it's
  15930. > still displaying life +4.
  15931.  
  15932. I have adjusted it to show the amount that it actually scavenges.
  15933. Tested and works perfectly.  NOW FIXED.
  15934.  
  15935. While testing the new scavenging code I was playing a little test game.
  15936. A Goblin Bomb popped out of an independent generator.  So I was like
  15937. "Cool! I'm gonna kill it then kill the generator!"  Only 1 problem, I only
  15938. had 2 creatures.  My Goblin and Gorilla were close to the Goblin Bomb, my
  15939. Wizard was 4 squares away.  I had no shooters, no flyers and no creatures
  15940. that move more than 1 square on my list.  So I kept casting various Goblins
  15941. and Gorillas and as they marched up to the Goblin Bomb to kill it they
  15942. would get blown away by the independent Ogre Mage who had clear and easy
  15943. shots on anything between my wizard and the generator.  Ok so this was
  15944. hopeless for the next few turns.  Then suddenly I got a spell that I never
  15945. use: Request!  I carefully analyzed everything on my list... I had a LOT of
  15946. spells that are better than request.  I usually just discard Request.  But
  15947. I _REALLY_ needed a shooter or a flying creature or even just a reasonably
  15948. fast creature like a Centaur or Unicorn.  So I prayed and prayed for
  15949. something along those lines and then cast my Request.
  15950.  
  15951. > What creature did you get ?
  15952.  
  15953. If I would have got a Vulture, Eagle, Floating Eye, Unicorn, Centaur,
  15954. Bolter, Elephant, any form of cat, or any of a number of other creatures
  15955. then I could have killed the generator on that turn.  But nooooo... I got a
  15956. Ghoul.  Luckily Ghouls are undead so that it could survive the 3 or 4
  15957. squares he had to walk from my wizard to the Goblin Bomb + Generator.  So 3
  15958. or 4 turns later I was able to kill the Goblin Bomb and Generator.
  15959.  
  15960. So the moral of the story is: Even spells that one never uses, _can_ be
  15961. vital in certain rare situations.
  15962.  
  15963. * BUG: Using the "m" key on an engaged creature sometimes produces somewhat
  15964.   wrong results.  NOW FIXED.
  15965.  
  15966. Robin Writes:
  15967. > I tried the Brustroem's Browser spell.
  15968. > I used the spell and look into the different spell books. But when I
  15969. > wanted to choose a spell, the game did not let me choose from my list but
  15970. > from the list of player 2. I attached a savegame.
  15971.  
  15972. Ok the last time I fixed Burstroem's Browser I wrote the right code but I
  15973. put it in the wrong place.  This means that for the last 4 months the spell
  15974. has been letting people CHEAT and cast spells from other people's spell
  15975. lists!  NOW FIXED.
  15976.  
  15977. November 5th, 2000:
  15978. * Added the 7 yes/no type strings to all the .catalog files.
  15979.  
  15980. SAI writes:
  15981. > Speaking of the info panels I've recently decided it would
  15982. > be nice to be able to see the life of a creature by simply
  15983. > placing the mouse over it.
  15984.  
  15985.  How about at the bottom of the screen:
  15986.  Wizard 1 (Sean)  Life 19
  15987.  NOW DONE.
  15988.  
  15989. November 6th, 2000:
  15990. * Sent v3.02 to FD and SAI for further playtesting.
  15991.   Executable filesize = 370196
  15992.  
  15993. * Sent v3.02t (23) to SF for testing Hungarian font support, etc.
  15994.  
  15995. * The newsmedia is stupid. re: Election.
  15996.  
  15997. November 7th
  15998. * BUG: M key shows that I can attack undeads when really I can't. 
  15999.   NOW FIXED.
  16000.  
  16001. * FLAW: The scroll panel does not 100% handle spell descriptions that are
  16002.   not all on 1 line.  NOW FIXED.
  16003.  
  16004. * Added code WaitVBlank(2); to all the keypresses so that, for example,
  16005.   when you are holding down the "s" key to see where you can shoot, the
  16006.   flashing is more solid and pleasing to the eye.
  16007.  
  16008. * Made an archive backup of all English Spell Descriptions to
  16009.   sc:SpellDescriptionsBackup.lha
  16010.  
  16011. * Ran FD's ReflowSpells.rexx script on the English spell descriptions.
  16012.   It didn't flow them like I wanted.  It went well beyond the defined
  16013.   LineLength var.  So I changed the script a bit and now it flows EXACTLY
  16014.   like Cygnus Ed Professional does (Format/WithoutFill).
  16015.  
  16016. * Henceforth I will keep all spell descriptions with a max line length of
  16017.   77 chars.
  16018.  
  16019. * Casting Brain Boost on a creature with max intelligence now raises its
  16020.   intelligence recovery by 1 point.
  16021.  
  16022. * REWROTE Double and Triple spell descriptions to say that you cannot
  16023.   double or triple any spell which grants multiple attempts.
  16024.  
  16025. * BUG: When 3 lines of text are displayed in the bottom text area of the
  16026.   main screen, lines 2 and 3 overlap each other a bit.  NOW FIXED.
  16027.  
  16028. FD Writes: ------------------------------------------------------------
  16029. > * I was asked a very strange question: "comrade nobody, would it be OK for
  16030. > you if I put this weak wall there next to your nothing ?" :-D ROFL !
  16031.  
  16032. NOW FIXED.
  16033.  
  16034.  
  16035. > * The answer to the question that was accepted was "y" and not "o" as is
  16036. > supposed to be in french mode.
  16037.  
  16038. NOW FIXED.
  16039.  
  16040.  
  16041. > * Something is wrong with the cloak graphics, I'm always mistakening it as
  16042. > "X-ray" ! I cloaked an enemy golem !
  16043.  
  16044. Well I programmed a really nifty gfx system so that you can redraw any
  16045. spell that you don't like.
  16046.  
  16047. Btw: hehehe its very funny that you cloaked an enemy golem. :)
  16048. Your AI must have some bugs in it. :)
  16049.  
  16050. END FD Writes ----------------------------------------------------------
  16051.  
  16052. * CHANGED Wood Elf to require 5 kills to promote to Dread Elf.  After
  16053.   extensive playtesting I have come to the conclusion that a Dread Elf
  16054.   is just to powerful to be allowed after only 4 kills.  It should be
  16055.   changed to 5 or 6.  Btw: it was _originally_ 5 kills when Sean first
  16056.   implemented it so I'm just setting it back like it was.
  16057.  
  16058.  
  16059. While creating the new CellEffectList() function I noticed that the
  16060. algorythmic sound effects controlled by the menu option only apply to
  16061. independent creatures.  Thus you can turn off the algorythmic sound effects
  16062. of the independents but not of computer controlled wizards.  Should this be
  16063. changed?
  16064.  
  16065. * FLAW?: Turning off algorythmic sounds does not affect the sound of the
  16066.   standard algorythmic "attack" sound.  NOW FIXED.
  16067.  
  16068. Sunday November 12th:
  16069. I have gotten almost no work done since the election.  Al Gore is trying to
  16070. steal our election from us!  Using dastardly lawyer manuvers!  This is very
  16071. upsetting and the political chaos is worsening every day :(
  16072. I can't concentrate on programming under such conditions. :(
  16073.  
  16074. * Problem: Special combat attacks take too long when there are many special
  16075.   combat attackers on the board.  I made a new CellEffectList function and
  16076.   rewrote the SpecialCombatHandler so that all the special combat graphical
  16077.   effects of a particular creature happen simultaneously for up to 8x speed
  16078.   improvement.  NOW FIXED.
  16079.  
  16080. * Robin and FD want your artifacts to go back to NOBODY when your wizard
  16081.   dies (instead of having them fall asleep).  NOW DONE.
  16082.  
  16083. * Problem: Computer-controlled flying creatures keep choosing to attack
  16084.   earthquakes when they should really be attacking the nearby enemy
  16085.   creatures.  This is because earthquakes are set to have 15 combat for some
  16086.   reason.  I have now changed earthquakes to have 0 combat.  Is this ok?
  16087.   NOW FIXED.
  16088.  
  16089. * Added: FD's new EndTurnSelect.iff and QuestionMarkSelect.iff
  16090.  
  16091. * Edited / Antialiased QuestionMark.iff and QuestionMarkSelect.iff
  16092.  
  16093. * FD says Agents should be highlighted while casting spells.  I looked
  16094.   into this and there was already code to do this.  However they weren't
  16095.   highlighted until the instant that the spell was about to be cast.  I have
  16096.   now changed this so that the creature is highlighted immediately, before
  16097.   any text is printed to the screen.  Thus the creature will now be
  16098.   highlighted for a longer period of time, without making anything take
  16099.   longer and without slowing the game down any.  Hopefully this will be
  16100.   good enough.  NOW DONE.
  16101.  
  16102. * ADDED Highlighting of real Generators because I like the Agent
  16103.   highlighting so much.
  16104.  
  16105. Robin Writes:
  16106. > I found another flaw: When using the Move It spell you're suddenly able to
  16107. > move the Solar on your own account. That's not good my dear oh no...
  16108.  
  16109. Congratulations, you have discovered another game secret.
  16110.  
  16111.  
  16112. November 13th: I haven't heard from Xav in weeks.  I was going to ask FD to
  16113. call him on the phone or drive to his house to see if he was still alive or
  16114. not.  I was very worried about him.  But today I _finally_ heard from him!
  16115. He was in the hospital with an appendicitis!  He could have died! :(
  16116.  
  16117. * Random Bug: Sometimes when the game loads Mod.ChaosTheme1, infinite
  16118.   enforcer hits are generated and all the fonts are destroyed.
  16119.  
  16120. November 14th, 2000:
  16121. * Assembled FD's new misca.asm for the music system to hopefully fix the
  16122.   above bug.
  16123.  
  16124. In order to test the new music system bugfix I have decided to play a REAL
  16125. game of Chaos.  I normally either,
  16126. A: Never play a game of Chaos.
  16127. B: Only play default games of me vs. 1 wizard and 4 generators.  I usually
  16128. win these games in less than 24 turns.
  16129.  
  16130. Ok, so now I will try me vs. 1 cpu wizard and 99 generators, Texas
  16131. Trash'em, 99 spells.  Both the cpu wizard and I died on turn 1
  16132. 4 games in a row.  I never started with cloak or lich so it was pretty
  16133. hopeless for me.
  16134.  
  16135. Now I am trying me + all 7 cpu wizards in an alliance against 99
  16136. generators, Texas Trash'em, 99 spells.
  16137.  
  16138. Turn 1:
  16139. I cast Weak Wall and blocked off a few generators.  So did 2 or 3
  16140. of my Allies!  We've already blocked a bunch of generators!
  16141.  
  16142. Turn 2:
  16143. I cast Lich on my Wizard.  Now I can win!
  16144.  
  16145. * UNBELIEVABLY STUPID!  All wizards are in an alliance against 99
  16146.   generators.  One of the computer wizards cast Coercion on turn 3!  Now we
  16147.   are all going to get killed because of this!  NOW FIXED.
  16148.  
  16149. Well wec  can't defend ourselves now, so a different wizard gets killed every
  16150. turn.  I couldn't cast spells for 5 turns!  By the time I could cast a
  16151. spell to help my allies the last one was dead! (He had been cloaked and
  16152. recover boosted.)
  16153.  
  16154. * FLAW: There is never an exophagy icon on my powerups list.  NOW FIXED.
  16155.  
  16156. It is now turn 81 and I've never ever had a Recover Boost the entire game.
  16157. I did however get 2 Exophagy spells which I cast on my wizard and his
  16158. replicate.  I've decided that Exophagy provides more strategy than Recover
  16159. Boost.  Scavenging provides more strategy than Recover Boost also.
  16160.  
  16161. Well I haven't seen the random music bug in 81 turns so I guess its gone.
  16162. However this is not really a bonafide test because I usually play with
  16163. speech and sound fx on, but this time I have them turned off for speed.
  16164.  
  16165. Turn 83: I am turning the sound effects and speech back on.
  16166.  
  16167. Turn 92:
  16168. I killed 7 generators, a T-Rex and a Stone Golem on 1 turn and now I get to
  16169. pick any 9 spells out of a list of 30.
  16170.  
  16171. Then during my next turn, I attacked with my Ghost and the ghost sound got
  16172. stuck in an infinite loop!  And it was generating infinite enforcer hits!
  16173. Ok so I opened up a shell and typed "who", it said that cli 9 was running
  16174. the ChaosDigitalSoundSubProcess so I typed "break 9 c" and it stopped the
  16175. enforcer hits and the sound.  But now the game is in some sort of "not
  16176. accepting any input" mode so I can't do anything in the game. :(
  16177.  
  16178. During this game I was offered Dead Revenge on my Bonus Spell Selection
  16179. panel at least 10 times.  I never picked it though.  I had cast level
  16180. twice.
  16181.  
  16182.  
  16183. I theorize that JCsound has some sort of bug whereby if there is a CPU load
  16184. right at the moment of starting (or buffer switching) a sound sample then
  16185. there is a finite possibility that things can get hung up.
  16186.  
  16187. 2nd theory: Something about the computerized speech or the algorythmic
  16188. sound effects routine is corrupting the audio.device.
  16189.  
  16190. Anyone who can solve this mystery automatically receives the
  16191. "Hero of the Month Award"
  16192.  
  16193. * FLAW: The score column is not positioned well on the score screen.
  16194.   My score on turn 92 is 11602 thus placing it up against the Life value.
  16195.   NOW FIXED.
  16196.  
  16197. * FLAW: Score screen score column is WAY out of position when playing in
  16198.   Deutsch or Polski.  NOW FIXED.
  16199.  
  16200. * BUG: Load any saved game and look at the score screen.  The life totals
  16201.   have not been freshly calculated so they are wrong.  NOW FIXED.
  16202.  
  16203. On 14-Nov-00, Frederic Delacroix wrote:
  16204. > * Uncertainty suffers from the same flow as vanish did before you fixed it.
  16205. > If there are many corpses, it will almost never generate anything.
  16206.  
  16207. I changed this so that it can now generate onto empty squares or onto dead
  16208. bodies.  NOW FIXED.
  16209.  
  16210. Note that if the board is mostly full of "stuff" (creatures, inanimates,
  16211. growths) then Uncertainity will probably not generate anything for you.
  16212. Its something to do with some law of physics that says you can't have 2
  16213. things in the same space at the same time. 8)
  16214.  
  16215. November 16th:
  16216. Sent v3.03 to FD and SAI for playtesting.  Executable filesize is 371880
  16217. bytes.
  16218.  
  16219. END OF VERSION 3.03
  16220.  
  16221. * EDITED Magic Carpet and Chainsaw graphics a bit.
  16222.  
  16223. * PROBLEM: I hate the animation of the Bolter.  So I just now changed it to
  16224.   something else.  It is now somewhat better than before, but still not
  16225.   very good.  Someone needs to fix this up.
  16226.  
  16227. FD Writes:
  16228. > * A wizard just cast poison dagger on its own bolter. Considering that a
  16229. > bolter can never attack, this is kinda stupid.
  16230. NOW FIXED.
  16231.  
  16232. > * When dismounting, the "M" key shows a lot of places where I cannot move (I
  16233. > have wizard wings+speed but I can only move one square in this situation).
  16234. NOW FIXED.
  16235.  
  16236.  
  16237. * Aaaaaaugh!  Reveal was set to only be a ranking of 4!  This is why
  16238.   computer wizards never cast it on anyone!  I am now raising it to 44 so
  16239.   that, basically, if they _can_ cast it on an enemy then they will.
  16240.  
  16241. * Sean and Frédéric both hate the green square for cloaked creatures.  This
  16242.   same green square is also used to draw unexplored squares.  Also FD has
  16243.   complained that the Cloak graphic is easily confused with the X-Ray
  16244.   graphic.  So I have now drawn a new Cloak graphic which is used for 3
  16245.   things:
  16246.   1. As the graphic for the Cloak spell.
  16247.   2. As the graphic for a cloaked creature.
  16248.   3. As the graphic for an unexplored square.
  16249.  
  16250.   If you do not like this graphic then you are free to draw a better one
  16251.   and it will automagically appear in the game.
  16252.  
  16253.  
  16254. * CHANGED Earthquakes back to 15 combat and adjusted the
  16255.   DangerousnessRating() routine to ignore combat, ranged combat, etc.
  16256.   when rating an inanimate object.  I did this so that a person could cast
  16257.   theoretically cast No Grow then Stone to Flesh on an Earthquake and have
  16258.   a powerful max combat creature.  I realize this will hardly ever happen.
  16259.   But it only needs to happen once for it to be all worthwhile.
  16260.  
  16261. END OF VERSION v3.04
  16262.